Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data/source/timrdf.github.com/agency.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SD Dataset: 'timrdf.github.com'

Homepage: https://github.com/timrdf
3 changes: 3 additions & 0 deletions data/source/timrdf.github.com/file-formats/dataset.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SD Dataset: 'timrdf.github.com/file-formats'

File formats that I made up.
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

gnaw () {
# Determine what properties are or could be declared about the subject.
# Example contents of $subject that finds both 'num_wires' and '#network':
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# num_wires=3
# #3> <#network> prov:specializationOf <todo>;
# #3> rdfs:comment "The first three parts of an IP" .
# #network=192.168.1
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# https://github.com/timrdf/csv2rdf4lod-automation/wiki/H0n3y-BadgeR
local subject="$1"
# ^ File path of a resource represention describing subject of interest.
grep "^.*=" $subject | sed 's/=.*$//'
# properties beginning with '#' are not declared but could be.
}

splash () {
# Export every declared property into the Bash execution scope.
# This allows a property e.g. '^num_wires=3` to be available as $num_wires.
# https://github.com/timrdf/csv2rdf4lod-automation/wiki/H0n3y-BadgeR
local subject="$1"
# ^ File path of a resource represention describing subject of interest.
alias=${subject%.properties} && alias=`basename "$alias"` # => 'nas'
>&2 echo "\"$alias\" (according to some of the $(wc -l "$subject" | awk '{print $1}') bytes within $subject)"
tab=$(echo "$alias" | sed 's/./ /g')
for predicate in $(gnaw "$subject" | grep -v '^#'); do
# Only those that are actually declared --^^
object=$(bite "$subject" "$predicate")
export $predicate="$object" # TODO: could we just have sourced the thing? :-)
>&2 echo "$tab $predicate: $object"
done
}

bite () {
# Determine the [object] value of a given property of a given subject.
# https://github.com/timrdf/csv2rdf4lod-automation/wiki/H0n3y-BadgeR
local subject="$1"
# ^ File path of a resource represention describing subject of interest.
local predicate="$2"
# ^ Relative path within $subject to a particular [object] value to obtain.
grep "^$predicate=" $subject | sed 's/^.*=//;s/\s*$//'
}

# https://github.com/timrdf/csv2rdf4lod-automation/wiki/H0n3y-BadgeR
err='BadgeR did not find a value for this property; check the property file and try again.'

# echo -e this to instantiate boilerplate:
tuft='#!/bin/bash\n#3> <> dcterms:format <https://github.com/timrdf/csv2rdf4lod-automation/wiki/H0n3y-BadgeR> .'
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://www.youtube.com/watch?v=box0-koAuIY</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://simple.wikipedia.org/wiki/Leet</string>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://docs.oracle.com/cd/E23095_01/Platform.93/ATGProgGuide/html/s0204propertiesfileformat01.html</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>URL</key>
<string>https://www.linux.com/training-tutorials/writing-simple-bash-script/</string>
</dict>
</plist>
12 changes: 12 additions & 0 deletions data/source/timrdf.github.com/file-formats/version/versions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SD Dataset: timrdf.github.com/file-formats

versions:

# 2021-10-30
* version identifier chosen as date created.
* New decade, new format!
* Defines and provides parsers for both BadgeP and H0n3yBadgeR formats.

# 2021-10-04
* version identifier chosen as date created.
* First commit of [wiki page](https://github.com/timrdf/csv2rdf4lod-automation/wiki/tic-turtle-in-comments) per [history](https://github.com/timrdf/csv2rdf4lod-automation/wiki/tic-turtle-in-comments/_history) and [tic.sh](https://github.com/timrdf/csv2rdf4lod-automation/commits/master/bin/util/tic.sh).