Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Helper scripts to make metadata capture a litte easier
- remove adding the record metadata to the Readme. The result isn't very clean anyway and it's fuzzy work.
- Loading branch information
Showing
3 changed files
with
77 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,46 @@ | ||
# Unofficial Arcscripts Archive | ||
Home: https://github.com/envygeo/arcscripts_archive | ||
|
||
a) listing of content published to [Esri ArcScripts][1] before it went offline, and | ||
b) restored copies of said content - when and if found | ||
|
||
|
||
The index csv is sourced from a post from Jim Barry in the thread [Please restore ArcScripts][2] on GeoNet. For convenience it's also in xls, but the csv remains definitive record (for version control). | ||
|
||
## Contributing Guidelines | ||
|
||
_Draft_ | ||
|
||
Fork the project and issue a pull request. | ||
|
||
Include a Readme with a short description of how you retrieved the package (e.g. downloaded from web archive, from your personal cache, asked So-n-so, ...). | ||
|
||
Please look for and indicate if the ArcScript has a newer version on https://codesharing.arcgis.com/. | ||
|
||
### Method | ||
- Extract zip to `./data/AS12345` | ||
- Create `./data/AS12345/_Readme.txt` | ||
- copy paste `12345` row from `ArcScripts_items.csv` | ||
- regex search & replace `\t` with `\r\n` (replace tabs with new line) | ||
- insert header metadata on source and retrieval date: | ||
|
||
~~~ | ||
# Source: Jim Barry, Geonet forum | ||
# Url: https://community.esri.com/message/895793-re-please-restore-arcscripts?commentID=895793&et=watches.email.thread#comment-895793 | ||
# Retrieved_date: 2019-12-11 | ||
~~~ | ||
|
||
Example: [`data/AS15287`](data/AS15287) | ||
|
||
The underscore `_` preface is prevent collision with a zipfile's Readme. If the zipfile readme has same name rename that one, not ours. | ||
|
||
|
||
### Binary files | ||
We're using [Git Large File Storage][3] extension. Please install it, check if the file types you add are already tracked in `.gitattributes.txt`. If not add them with an incantation like `git lfs track *.shp`. | ||
|
||
|
||
|
||
## License | ||
The MIT license chosen is for the overall project (index, meta information, workflows, update scripts, etc.). Each script could have it's own license, underneath the license Esri used when the original collection was compiled. | ||
|
||
[1]: http://arcscripts.esri.com | ||
[2]: https://community.esri.com/thread/182094-please-restore-arcscripts | ||
[3]: https://git-lfs.github.com/ | ||
# Unofficial Arcscripts Archive | ||
Home: https://github.com/envygeo/arcscripts_archive | ||
|
||
a) listing of content published to [Esri ArcScripts][1] before it went offline, and | ||
b) restored copies of said content - when and if found | ||
|
||
|
||
The index csv is sourced from a post from Jim Barry in the thread [Please restore ArcScripts][2] on GeoNet. For convenience it's also in xls, but the csv remains definitive record (for version control). | ||
|
||
## Contributing Guidelines | ||
|
||
_Draft_ | ||
|
||
Fork the project and issue a pull request. | ||
|
||
Include a Readme with a short description of how you retrieved the package (e.g. downloaded from web archive, from your personal cache, asked So-n-so, ...). | ||
|
||
Please look for and indicate if the ArcScript has a newer version on https://codesharing.arcgis.com/. | ||
|
||
### Method | ||
- Extract zip to `./data/AS9999` | ||
- Create `./data/AS9999/_Readme.txt` | ||
- insert header metadata on source and retrieval date: | ||
|
||
~~~ | ||
# Source: Jim Barry, Geonet forum | ||
# Url: https://community.esri.com/message/895793-re-please-restore-arcscripts?commentID=895793&et=watches.email.thread#comment-895793 | ||
# Retrieved_date: 2019-12-11 | ||
~~~ | ||
|
||
Example: [`data/AS15287`](data/AS15287) | ||
|
||
The underscore `_` preface is prevent collision with a zipfile's Readme. If the zipfile readme has same name rename that one, not ours. | ||
|
||
|
||
### Binary files | ||
We're using [Git Large File Storage][3] extension. Please install it, check if the file types you add are already tracked in `.gitattributes.txt`. If not add them with an incantation like `git lfs track *.shp`. | ||
|
||
|
||
|
||
## License | ||
The MIT license chosen is for the overall project (index, meta information, workflows, update scripts, etc.). Each script could have it's own license, underneath the license Esri used when the original collection was compiled. | ||
|
||
[1]: http://arcscripts.esri.com | ||
[2]: https://community.esri.com/thread/182094-please-restore-arcscripts | ||
[3]: https://git-lfs.github.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@echo. | ||
@echo. Searching ArcScripts_Items.csv for records matching 'AS' folders | ||
@echo. and exporting to AS9999\_item.csv | ||
@echo. | ||
@for /d %%a in (AS*) do @( | ||
if not exist "%%a\_item.csv" ( | ||
findstr /i "%%a" ..\ArcScripts_Items.csv > "%%a"\_item.csv | ||
@echo. | ||
type "%%a\_item.csv" | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@echo. | ||
@if [%1]==[] goto :Usage | ||
@if not exist "%1" goto :Usage | ||
@if exist "%1\_Readme.txt" goto :Exists | ||
|
||
:Main | ||
@echo # Source: replace_with_person_or_place > "%1\_Readme.txt" | ||
@echo # Url: replace_with_link >> "%1\_Readme.txt" | ||
@echo # Retrieved_by: %USERNAME% >> "%1\_Readme.txt" | ||
@echo # Retrieved_date: %DATE% >> "%1\_Readme.txt" | ||
@goto :EOF | ||
|
||
:: ------------- routines --------------- | ||
:Exists | ||
@echo. "%1\_Readme.txt" already exists. | ||
@goto :eof | ||
|
||
:Usage | ||
@echo. %~n0 [folder_name] | ||
@goto :eof |