Code Monkey home page Code Monkey logo

crals's Introduction

Community Resource for Archivists and Librarians Scripting

Our community resource is intended to provide helpful one-liners and script code specifically drawn from real-life examples in archives and libraries. Take these, use them in your workflows, change them up, contribute back! Remember: you have to crawl before you walk. (See what we did there with the acronym?)

This is just the beginning! Check it out on the web here: http://dd388.github.io/crals/

We plan to add documentation on how to add your own comments soon, so if you have an idea for a command/explanation you'd like to contribute and wading into the index.html is not for you, feel free to add it as an Issue for now.

Created by Jarrett Drake and Dianne Dietrich.

How do I contribute?

You are welcome to edit the codebase yourself, or just supply the information and ask it to be added to the site.

Edit codebase

To contribute to this project directly (and more quickly), clone this repository and create a new branch (git checkout -b your-branch-name) and add or modify a new block in index.html. Then submit a pull request and the maintainers will review and integrate your code. There is a commented-out sample block available at the bottom of index.html that can be as a guideline for your command.

Make a request

If you are having trouble with coding it yourself or with github, feel free to submit an issue with the kind of command you would like to see added to the site.

General help

If you want to help but don't have a new script to add, you can help us by testing out the scripts available, by refining or clarifying the documentation, or creating an issue for anything that sounds confusing and requires clarification.

Credits and Thank You

Nick Krabbenhoeft (for adding an rsync example and a section on moving around the command line)

Ashley Blewer (for adding disk usage commands)

Bertram Lyons (for adding commands)

Kieran O'Leary (for adding commands and offering Windows shell guidance)

Hillel Arnold (for adding code to make individual commands linkable)

Ashley Blewer, Eddy Colloton, Rebecca Dillmeier, Jonathan Farbowitz, Rebecca Fraimow, Samuel Gutterman, Kelly Haydon, Reto Kromer, Nicole Martin, Katherine Frances Nagels, Kieran O'Leary, Catriona Schlosser, Ben Turkus (the AMIA AV Hack Team that built ffmprovisr)

crals's People

Contributors

dd388 avatar nkrabben avatar ablwr avatar helrond avatar kieranjol avatar

Stargazers

Matthew Yang avatar Swapnil Joshi avatar Bleakley McDowell avatar Lauren Work avatar  avatar  avatar Will Skora avatar  avatar  avatar simon avatar  avatar Jess Whyte avatar Ross Spencer avatar Edgar Hernandez avatar Kathryn Gronsbell avatar Jesse Johnston avatar Shaun Trujillo avatar Richard Lehane avatar Samantha Abrams avatar Tod Robbins avatar  avatar  avatar Katherine Frances Nagels avatar

Watchers

Richard Lehane avatar James Cloos avatar  avatar  avatar  avatar Jesse Johnston avatar Bertram Lyons avatar  avatar  avatar

crals's Issues

Clarification on which shells/OS are supported

Hi!

Your site is fantastic and I look forward to seeing it grow. Are ye sticking to bash commands/scripts exclusively? I haven't noticed any Windows commands, but at the same time, I didn't see any bash-specific language in the documentation. Have ye any desire to support windows-only commands, and if so , how should they be differentiated from the bash?

Rename WAV files by substituting one string for another within the existing filename

for i in *.wav; do mv “$i” “$(echo $i | sed ’s/MAC/MN/g’)”; done

This is a supplement to the command to append file extensions. This works within the full filename string, instead of only at the beginning or end. It uses “sed” to do this substitution work. The ‘s’ tells sed that we want it to perform a substitution. The "/" characters serve as separators between the old and new values we want to find/replace. First we define the old value we want to replace. In this case “MAC”. Then we define the new value we want to substitute for the old value. In this case “MN”. The ‘g’ tells sed that we want it to do this globally in the string, i.e., every time it sees MAC it replaces with MN. It is essentially a find and replace action.

  • Bert

Contributing guidelines

It would be nice to add contribution guidelines. I think Github now supports a contributing.md, but I'm not that well-versed in writing contribution guidelines.

One thing I'd like to see highlighted is ways to find frequently used commands to turn into contributions. I'm starting with history | less but working towards a cut command.

Add bash history storage increase command

The command we're building in #18 can be more useful with more commands stored in the history. The problem is, is that this gets kind of shell-specific. I'll make a PR for bash since that should cover the base case, but it will probably need more shells over time.

List all files/folders and write out to external text file

ls -alR /set/your/path/here > /set/your/output/path/inventory.txt

This is great way to extract a list of files/directories (as well as filesystem data about the files/directories) to a "space" separated text file that you can parse separately from the CLI interface.

  • Bert

Handling White Space suggestion

In the Handling White Space tip, I think it would be safe to make the note that a script should capture the user's original IFS and then reset the IFS once the script completes:

For example:
oIFS=$IFS
IFS=$'\n'
[script text]
IFS=oIFS

Add advice on using mouse to move cursor

A lot of the commands here are fairly long and have sections that need to be edited like source and destination directories.

I think it would be useful to have directions about using the mouse to move cursor. I know on Terminal and ZSH on Macs you can do this by pressing alt/option and clicking where you want the cursor to go. Is this universal enough on other consoles that we can add instructions for it?

Another option could be some of the basic cursor movement commands like ctrl+a and ctrl+e
https://www.gnu.org/software/bash/manual/html_node/Commands-For-Moving.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.