@@ -19,66 +19,150 @@ $ touch .gitkeep
1919*/
2020
2121const readmes = [
22+ // c2patool
2223 {
23- dest : resolve ( __dirname , '../docs/rust-sdk /readme.md' ) ,
24- repo : 'contentauth/c2pa-rs ' ,
24+ dest : resolve ( __dirname , '../docs/c2patool /readme.md' ) ,
25+ repo : 'contentauth/c2patool ' ,
2526 path : 'README.md' ,
27+ branch : 'crandmck/update-contributing' ,
2628 } ,
2729 {
28- dest : resolve ( __dirname , '../docs/c2pa-min/readme.md' ) ,
29- repo : 'contentauth/c2pa-min' ,
30- path : 'README.md' ,
30+ dest : resolve ( __dirname , '../docs/c2patool/docs/usage.md' ) ,
31+ repo : 'contentauth/c2patool' ,
32+ path : 'docs/usage.md' ,
33+ branch : 'crandmck/update-contributing' ,
3134 } ,
3235 {
33- dest : resolve ( __dirname , '../docs/c2patool/readme.md' ) ,
34- repo : 'contentauth/c2patool' ,
35- path : 'README.md' ,
36+ dest : resolve ( __dirname , '../docs/c2patool/docs/supported-formats.md' ) ,
37+ repo : 'contentauth/c2pa-rs' ,
38+ path : 'docs/supported-formats.md' ,
39+ branch : 'crandmck/reorg-docs' ,
3640 } ,
3741 {
38- dest : resolve ( __dirname , '../docs/c2patool/manifest.md' ) ,
42+ dest : resolve ( __dirname , '../docs/c2patool/docs/ manifest.md' ) ,
3943 repo : 'contentauth/c2patool' ,
4044 path : 'docs/manifest.md' ,
45+ branch : 'crandmck/update-contributing' ,
4146 } ,
4247 {
43- dest : resolve ( __dirname , '../docs/c2patool/x_509.md' ) ,
48+ dest : resolve ( __dirname , '../docs/c2patool/docs/ x_509.md' ) ,
4449 repo : 'contentauth/c2patool' ,
4550 path : 'docs/x_509.md' ,
51+ branch : 'crandmck/update-contributing' ,
4652 } ,
4753 {
48- dest : resolve ( __dirname , '../docs/c2patool/release-notes.md' ) ,
54+ dest : resolve ( __dirname , '../docs/c2patool/docs/ release-notes.md' ) ,
4955 repo : 'contentauth/c2patool' ,
5056 path : 'docs/release-notes.md' ,
57+ branch : 'crandmck/update-contributing' ,
5158 } ,
5259 {
5360 dest : resolve ( __dirname , '../docs/c2pa-service-example/readme.md' ) ,
5461 repo : 'contentauth/c2pa-service-example' ,
5562 path : 'README.md' ,
5663 } ,
64+ // Node.js lib
5765 {
58- dest : resolve ( __dirname , '../docs/c2pa-c /readme.md' ) ,
59- repo : 'contentauth/c2pa-c ' ,
66+ dest : resolve ( __dirname , '../docs/c2pa-node /readme.md' ) ,
67+ repo : 'contentauth/c2pa-node ' ,
6068 path : 'README.md' ,
69+ branch : 'crandmck/docs-overhaul' ,
6170 } ,
6271 {
63- dest : resolve ( __dirname , '../docs/c2pa-node/readme .md' ) ,
72+ dest : resolve ( __dirname , '../docs/c2pa-node/docs/usage .md' ) ,
6473 repo : 'contentauth/c2pa-node' ,
65- path : 'README.md' ,
74+ path : 'docs/usage.md' ,
75+ branch : 'crandmck/docs-overhaul' ,
76+ } ,
77+ {
78+ dest : resolve ( __dirname , '../docs/c2pa-node/docs/supported-formats.md' ) ,
79+ repo : 'contentauth/c2pa-rs' ,
80+ path : 'docs/supported-formats.md' ,
81+ branch : 'crandmck/reorg-docs' ,
82+ } ,
83+ {
84+ dest : resolve ( __dirname , '../docs/c2pa-node/docs/release-notes.md' ) ,
85+ repo : 'contentauth/c2pa-node' ,
86+ path : 'docs/release-notes.md' ,
87+ branch : 'crandmck/docs-overhaul' ,
6688 } ,
6789 {
6890 dest : resolve ( __dirname , '../docs/c2pa-node-example/readme.md' ) ,
6991 repo : 'contentauth/c2pa-node-example' ,
7092 path : 'README.md' ,
7193 } ,
94+ // Python lib
7295 {
7396 dest : resolve ( __dirname , '../docs/c2pa-python/readme.md' ) ,
7497 repo : 'contentauth/c2pa-python' ,
7598 path : 'README.md' ,
99+ branch : 'docs/add-rns-and-reorg' ,
100+ } ,
101+ {
102+ dest : resolve ( __dirname , '../docs/c2pa-python/docs/usage.md' ) ,
103+ repo : 'contentauth/c2pa-python' ,
104+ path : 'docs/usage.md' ,
105+ branch : 'docs/add-rns-and-reorg' ,
106+ } ,
107+ {
108+ dest : resolve ( __dirname , '../docs/c2pa-python/docs/supported-formats.md' ) ,
109+ repo : 'contentauth/c2pa-rs' ,
110+ path : 'docs/supported-formats.md' ,
111+ branch : 'crandmck/reorg-docs' ,
112+ } ,
113+ {
114+ dest : resolve ( __dirname , '../docs/c2pa-python/docs/release-notes.md' ) ,
115+ repo : 'contentauth/c2pa-python' ,
116+ path : 'docs/release-notes.md' ,
117+ branch : 'docs/add-rns-and-reorg' ,
76118 } ,
77119 {
78120 dest : resolve ( __dirname , '../docs/c2pa-python-example/readme.md' ) ,
79121 repo : 'contentauth/c2pa-python-example' ,
80122 path : 'README.md' ,
81123 } ,
124+ // C lib
125+ {
126+ dest : resolve ( __dirname , '../docs/c2pa-c/readme.md' ) ,
127+ repo : 'contentauth/c2pa-c' ,
128+ path : 'README.md' ,
129+ } ,
130+ {
131+ dest : resolve ( __dirname , '../docs/c2pa-c/docs/supported-formats.md' ) ,
132+ repo : 'contentauth/c2pa-rs' ,
133+ path : 'docs/supported-formats.md' ,
134+ branch : 'crandmck/reorg-docs' ,
135+ } ,
136+ // Rust lib
137+ {
138+ dest : resolve ( __dirname , '../docs/rust-sdk/readme.md' ) ,
139+ repo : 'contentauth/c2pa-rs' ,
140+ path : 'README.md' ,
141+ branch : 'crandmck/reorg-docs' ,
142+ } ,
143+ {
144+ dest : resolve ( __dirname , '../docs/rust-sdk/docs/supported-formats.md' ) ,
145+ repo : 'contentauth/c2pa-rs' ,
146+ path : 'docs/supported-formats.md' ,
147+ branch : 'crandmck/reorg-docs' ,
148+ } ,
149+ {
150+ dest : resolve ( __dirname , '../docs/rust-sdk/docs/usage.md' ) ,
151+ repo : 'contentauth/c2pa-rs' ,
152+ path : 'docs/usage.md' ,
153+ branch : 'crandmck/reorg-docs' ,
154+ } ,
155+ {
156+ dest : resolve ( __dirname , '../docs/rust-sdk/docs/release-notes.md' ) ,
157+ repo : 'contentauth/c2pa-rs' ,
158+ path : 'docs/release-notes.md' ,
159+ branch : 'crandmck/reorg-docs' ,
160+ } ,
161+ {
162+ dest : resolve ( __dirname , '../docs/c2pa-min/readme.md' ) ,
163+ repo : 'contentauth/c2pa-min' ,
164+ path : 'README.md' ,
165+ } ,
82166] ;
83167
84168function resolveMarkdownLinks ( linkBase , content ) {
@@ -101,8 +185,9 @@ async function download() {
101185 const linkBase = `${ GITHUB_HOST } /${ repo } /blob/${ branch } /${ path } ` ;
102186 const res = await fetch ( src ) ;
103187 const markdown = await res . text ( ) ;
104- const resolvedMarkdown = resolveMarkdownLinks ( linkBase , markdown ) ;
105- await writeFile ( dest , resolvedMarkdown , { encoding : 'utf-8' , flag : 'w+' } ) ;
188+ //const resolvedMarkdown = resolveMarkdownLinks(linkBase, markdown);
189+ //await writeFile(dest, resolvedMarkdown, { encoding: 'utf-8', flag: 'w+' });
190+ await writeFile ( dest , markdown , { encoding : 'utf-8' , flag : 'w+' } ) ;
106191 console . log ( 'Saved %s to %s' , src , dest ) ;
107192 }
108193}
0 commit comments