diff --git a/common/modules/swh-fuse.org b/common/modules/swh-fuse.org index 3597a0b..f2c62ab 100644 --- a/common/modules/swh-fuse.org +++ b/common/modules/swh-fuse.org @@ -1,139 +1,151 @@ #+COLUMNS: %40ITEM %10BEAMER_env(Env) %9BEAMER_envargs(Env Args) %10BEAMER_act(Act) %4BEAMER_col(Col) %10BEAMER_extra(Extra) %8BEAMER_opt(Opt) #+INCLUDE: "prelude.org" :minlevel 1 ** Software Heritage Filesystem (SwhFS) :PROPERTIES: :CUSTOM_ID: oneslide :END: *** The *Software Heritage Filesystem (SwhFS)* is a user-space POSIX filesystem that enables browsing parts of the Software Heritage archive as if it were locally available. *** - code: [[https://forge.softwareheritage.org/source/swh-fuse/][forge.softwareheritage.org/source/swh-fuse]] - documentation: [[https://docs.softwareheritage.org/devel/swh-fuse/][docs.softwareheritage.org/devel/swh-fuse]] *** #+BEGIN_EXPORT latex \begin{thebibliography}{Foo Bar, 1969} \bibitem{Allancon2021} Thibault Allançon, Antoine Pietri, Stefano Zacchiroli \newblock The Software Heritage Filesystem (SwhFS): Integrating Source Code Archival with Development \newblock ICSE 2021: The 43rd International Conference on Software Engineering \newblock \url{https://arxiv.org/abs/2102.06390} \end{thebibliography} #+END_EXPORT ** Software Heritage Filesystem (SwhFS) --- Example :noexport: :PROPERTIES: :CUSTOM_ID: examplemini :END: *** #+BEAMER: \footnotesize #+BEGIN_SRC $ mkdir swhfs $ swh fs mount swhfs/ # mount the archive $ cd swhfs/ $ cat archive/swh:1:cnt:c839dea9e8e6f0528b468214348fee8669b305b2 #include int main(void) { printf("Hello, World!\n"); } $ cd archive/swh:1:dir:1fee702c7e6d14395bbf5ac3598e73bcbf97b030 $ ls | wc -l 127 $ grep -i antenna THE_LUNAR_LANDING.s | cut -f 5 # IS THE LR ANTENNA IN POSITION 1 YET # BRANCH IF ANTENNA ALREADY IN POSITION 1 #+END_SRC * Software Heritage Filesystem (SwhFS) --- Tutorial :PROPERTIES: :CUSTOM_ID: tutorial :END: ** Software Heritage Filesystem (SwhFS) --- Tutorial + :PROPERTIES: + :CUSTOM_ID: tutorial1 + :END: *** #+BEGIN_SRC $ pip install swh.fuse # install SwhFS $ mkdir swhfs $ swh fs mount swhfs/ # mount the archive $ ls -1F swhfs/ # list entry points archive/ # <- start browsing from here cache/ origin/ README #+END_SRC ** Software Heritage Filesystem (SwhFS) --- Tutorial (cont.) + :PROPERTIES: + :CUSTOM_ID: tutorial2 + :END: *** #+BEAMER: \footnotesize #+BEGIN_SRC $ cd swhfs/ $ cat archive/swh:1:cnt:c839dea9e8e6f0528b468214348fee8669b305b2 #include int main(void) { printf("Hello, World!\n"); } #+END_SRC ** Software Heritage Filesystem (SwhFS) --- Tutorial (cont.) + :PROPERTIES: + :CUSTOM_ID: tutorial3 + :END: *** #+BEAMER: \footnotesize #+BEGIN_SRC $ cd archive/swh:1:dir:1fee702c7e6d14395bbf5ac3598e73bcbf97b030 $ ls | wc -l 127 $ grep -i antenna THE_LUNAR_LANDING.s | cut -f 5 # IS THE LR ANTENNA IN POSITION 1 YET # BRANCH IF ANTENNA ALREADY IN POSITION 1 #+END_SRC ** Software Heritage Filesystem (SwhFS) --- Tutorial (cont.) + :PROPERTIES: + :CUSTOM_ID: tutorial4 + :END: *** #+BEAMER: \footnotesize #+BEGIN_SRC $ cd archive/swh:1:rev:9d76c0b163675505d1a901e5fe5249a2c55609bc $ ls -F history/ meta.json@ parent@ parents/ root@ $ jq '.author.name, .date, .message' meta.json "Michal Golebiowski-Owczarek" "2020-03-02T23:02:42+01:00" "Data:Event:Manipulation: Prevent collisions with Object.prototype ..." $ find root/src/ -type f -name '*.js' | xargs cat | wc -l 10136 #+END_SRC ** Software Heritage Filesystem (SwhFS) --- Tutorial (cont.) *** #+BEAMER: \footnotesize #+BEGIN_SRC $ swh web search git-annex --limit 1 ... git://git.joeyh.name/git-annex.git \ https://archive.softwareheritage.org/api/1/origin/git://git.joeyh.name/git-annex.git/visits/ ... $ swh web search git-annex --url-encode | cut -f 1 git%3A%2F%2Fgit.joeyh.name%2Fgit-annex.git $ cd origin/git%3A%2F%2Fgit.joeyh.name%2Fgit-annex.git $ ls -F 2020-12-19/ $ ls 2020-12-19/snapshot/refs/heads/master/root/ Annex/ COPYRIGHT NEWS Annex.hs Creds.hs P2P/ Assistant/ Crypto.hs README Assistant.hs Database/ Remote/ Backend/ debian/ RemoteDaemon/ #+END_SRC