A CLI application which allows you to archive Urbit channels and all linked content in them.

Overview

The Urbit Content Archiver is a small CLI application that exports channels from your Urbit ship and auto-downloads any directly linked content locally in order to preserve and archive the content for the future. The archiver supports media files (jpg, png, gif, mp3, flac, mkv, mp4, flc, etc.), archives (zip, 7z, tar, etc.), torrents, and text-based files (epub, pdf, doc, txt, etc.)

This application uses the Rust Urbit HTTP API Crate.

Using The Urbit Content Archiver

Usage:
        urbit-content-archiver chat <ship> <name> [--config=<file_path> --output=<folder_path>]
        urbit-content-archiver notebook <ship> <name> [--config=<file_path> --output=<folder_path>]
Options:
      --config=<file_path>  Specify a custom path to a YAML ship config file.
      --output=<folder_path>  Specify a custom path where the output files will be saved.

As can be seen above, the Urbit Content Archiver is quite straightforward to use. It uses a non-interactive interface in order to allow it to be interoperable with other tools/applications. This allows for setting up cron-jobs to say archive a chat every X hours, setup hotkeys to do it on-command, or anything you can imagine in between. Any previously archived content is skipped over (not downloaded again), thereby allowing you to keep running the archiver on the same channels and only downloading new content.

Current Supported Commands & Flags

chat

This command allows you to export and archive any chat which your ship has joined as a markdown file. Any content files that are linked to in the chat will be automatically downloaded locally and linked within the markdown as well.

It can be used as such:

./urbit-content-archiver chat ~darrux-landes development

The chat graph will be requested from your ship (may take a number of seconds for your ship to process the request depending on chat size), and then once received, processed into a clean markdown formatting style as seen above (do note the above is a processed preview from the markdown).

The markdown chat archive is saved locally as <ship>-<name>.md and the downloaded content is stored in the archived-content folder.

notebook

This command allows you to export and archive any notebook which your ship has joined as a markdown file. Any media or content files that are linked in the notebook (via the []() markdown linking format) will be automatically downloaded locally and linked within the markdown as well.

It can be used as such:

./urbit-content-archiver notebook ~bollug-worlus index-weekly

The chat graph will be requested from your ship (may take a number of seconds for your ship to process the request depending on chat size), and then once received, processed into a clean markdown formatting style as seen above (do note the above is a processed preview from the markdown).

The markdown chat archive is saved locally as <ship>-<name>.md and the downloaded content is stored in the archived-content folder.

--config=<file_path>

This flag allows you to specify which ship config yaml file to use via file path. This and other flags can be useful for many circumstances, such as setting up a cron job.

--output=<folder_path>

This flag allows you to specify the output folder path where the archived data will be saved.

Building The Application

Ensure that you have the latest version of Rust installed and the libssl-dev package on Ubuntu (aka openssl-devel on Fedora, and potentially slightly different on other distros).

  1. Clone this repository and enter into the folder.

  2. Run the setup script which will compile and prepare everything for you.

sh setup.sh
  1. The Urbit Content Archiver application will be compiled, moved into the deployed folder, and begin using the application.

  2. Use the archiver:

./urbit-content-archiver chat ~darrux-landes development
  1. If you haven't specified one already, the ship_config.yaml will be automatically generated for you and will require editing to add your Urbit ship's ip/port/+code.
You might also like...
Teach best practices by violating them.

Substrate Node Template A fresh FRAME-based Substrate node, ready for hacking 🚀 Getting Started Follow the steps below to get started with the Node T

Manage lockfiles in PKGBUILDs for upstreams that don't ship them, `updpkgsums` for dependency trees (Arch Linux tooling)

updlockfiles Manage lockfiles for packages that don't ship any upstream. Like updpkgsums but for 3rd party dependency trees. If you're not actively ma

reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no extra setup alongside exposing a API ready to query the data.
reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no extra setup alongside exposing a API ready to query the data.

reth-indexer reth-indexer reads directly from the reth db and indexes the data into a postgres database all decoded with a simple config file and no e

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;
Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens;

Metaplex is a protocol built on top of Solana that allows: Creating/Minting non-fungible tokens; Starting a variety of auctions for primary/secondary

A mdbook preprocessor that allows the re-usability of template files with dynamic arguments

mdbook-template A mdbook preprocessor that allows the re-usability of template files with dynamic arguments Table of Contents Author Notes Installatio

Allows deploying modules to Aptos under resource accounts.

Aptos Deployer Module containing helpers for deploying resource accounts. Resource accounts allow the module to sign as itself on-chain, which is usef

MevWallet is a smart contract wallet that allows the user to capture MEV from Searchers, or create MEV on purpose.

MevWallet MevWallet is a smart contract wallet that allows the user to capture MEV from Searchers, or create MEV on purpose. This repo contains the so

Trait that allows comparing a value to a range of values.

range_cmp Docs This Rust crate provides the RangeComparable trait on all types that implement Ord. This traits exposes a rcmp associated method that a

All the data an IC app needs to make seamless experiences, accessible directly on the IC. DAB is an open internet service for NFT, Token, Canister, and Dapp registries.
All the data an IC app needs to make seamless experiences, accessible directly on the IC. DAB is an open internet service for NFT, Token, Canister, and Dapp registries.

DAB 👀 Overview An Internet Computer open internet service for data. All the data an IC app needs to make a seamless experience, accessible directly o

Comments
  • Can't archive certain channels

    Can't archive certain channels

    This is a great tool, and I was able to archive some notebooks and channels.

    but if I try to do this on: /~landscape/ship/~bitbet-bolbel/urbit-community/resource/chat/ship/~nibset-napwyn/grants--bounties--projects-1653

    ./urbit-content-archiver chat ~nibset-napwyn grants--bounties--projects-1653

    It seems like it makes an attempt (I can see the http request in my dojo) but it stops after a few seconds:

    Requesting ~nibset-napwyn/grants--bounties--projects-1653 chat graph from your ship...
    Failed to export chat. Please make sure that the `ship` & `name` are valid and are from a chat that your ship has joined.
    

    Same thing happens when ./urbit-content-archiver chat ~darrux-landes general

    Hope you can help with this! You can message me at ~lorfeb-taglut as well.

    opened by tlontravis 1
  • error[E0658]: procedural macros cannot be expanded to expressions

    error[E0658]: procedural macros cannot be expanded to expressions

    Rust noob issue:

       Compiling tracing-futures v0.2.4
    error[E0658]: procedural macros cannot be expanded to expressions
      --> /home/me/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-util-0.6.2/src/sync/poll_semaphore.rs:21:29
       |
    21 |               inner: Box::pin(async_stream::stream! {
       |  _____________________________^
    22 | |                 loop {
    23 | |                     match semaphore.clone().acquire_owned().await {
    24 | |                         Ok(permit) => yield permit,
    ...  |
    27 | |                 }
    28 | |             }),
       | |_____________^
       |
       = note: see issue #54727 <https://github.com/rust-lang/rust/issues/54727> for more information
    

    Is this directly something from UOT or should I swim upstream to resolve?

    opened by sigilante 1
  • Restoring from archive?

    Restoring from archive?

    Is there any way (or future plans) to "preconfigure" a new urbit using previously-archived content from another urbit?

    use case I have in mind:

    • Start a comet
    • Look around, get acquainted, set up some profile details, join channels, etc.
    • Archive content
    • Finally get a planet
    • Import the stuff from your comet so you don't have to re-find and recreate all the Urbit-exploration progress you made

    I know onboarding is a high priority for the Landscape team, and I wonder if a project like this could get integrated into the tutorial, eventually. I can imagine a tutorial prompt a-la, "now that you've looked around a bit, click [this button] to enable snapshots, which you can use to quickly get back to where you were if you start a new comet or planet"

    opened by vcavallo 1
Owner
Robert Kornacki
Explorations into the realms of Haskell, Idris, Lean, Coq, Agda, Plutus, mCRL2 and wherever else fate leads me next.
Robert Kornacki
A blazingly fast, ShareX uploader coded in Rust (using actix web) which utilizes AES-256-GCM-SIV to securely store uploaded content.

Magnesium Oxide ❔ What is this? Magnesium-Oxide (MGO) is a secure file uploader with support for ShareX. ?? Features ?? Blazingly fast uploads and enc

Nitrogen Development 26 Nov 25, 2022
Cloup is a template manager that provides the files you desire when you need them, written in Rust.

cloup cloup is a template manager that delivers the files you desire when you need them, written in rust you no longer need to locate your previous pr

Benjamin Akar 62 Dec 5, 2022
Doubly-linked list that stores key-node pairs.

key-node-list Doubly-linked list that stores key-node pairs. KeyNodeList is a doubly-linked list, it uses a hash map to maintain correspondence betwee

MaxXing 3 May 4, 2022
Experiments on blockchain technology (also known as Hashed & Zero-trust Verifiable Linked List)

AngeloChain Experiments on blockchain technology (also known as Hashed & Zero-trust Verifiable Linked List) ⚠️ Before We Get Started Before we get sta

Angelo 1 Jan 20, 2022
Windows Linked Lists in idiomatic Rust (LIST_ENTRY, SINGLE_LIST_ENTRY)

nt-list by Colin Finck <[email protected]> Provides compatible, type-safe, and idiomatic Rust implementations of the Windows NT Linked Lists, known as

Colin Finck 13 Feb 25, 2023
Customisable CLI agents to answer all your quick questions. ⚙️

Agent Smith ??️‍♂️ Your ally in the battle for mental space between you and the multiverse of CLI tools. ?? Setup OpenAI API Token You need to set the

Lef Filippakis 3 May 3, 2023
CLI tool written in Rust which can be used to generate hashes

rustgenhash rustgenhash is a tool to generate hashes on the commandline from stdio. It can be used to generate single or multiple hashes for usage in

Volker Schwaberow 11 Dec 29, 2022
A CLI application that implements multi-key-turn security via Shamir's Secret Sharing.

agree agree is a CLI tool for easily applying multi-key-turn security via Shamirs Secret Sharing. Project state agree is unstable. Version semantics:

Alexander Weber 19 Aug 29, 2023
A prototype project integrating jni rust into Kotlin and using protobuf to make them work together

KotlinRustProto a prototype project integrating jni rust into Kotlin and using protobuf to make them work together How to start add a RPC call in Droi

woo 11 Sep 5, 2022
Taking the best of Substrate Recipes and applying them to a new framework for structuring a collection of how-to guides.

Attention: This repository has been archived and is no longer being maintained. It has been replaced by the Substrate How-to Guides. Please use the Su

Substrate Developer Hub 35 Oct 17, 2022