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
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,25 @@ is and run the following line in your terminal
Enjoy!

## Use it anywhere
If you want to be able to call this script no matter where you are, you can add the following lines to your `.bashrc`, `.bash_alias`, etc (Note: you only need it in one of them)
Follow these instructions if you want to be able to call this script no matter where you are.
### *Nix Users
Add the following lines to your `.bashrc`, `.bash_alias`, etc (Note: you only need it in one of them)

`alias pinit='/path/to/where/the/script/is/setup_project_dir.sh'`

and you can use it as such: `pinit /path/to/folder` or if you are already in the folder `pinit .`

### Windows 10 PowerShell Users
Add the following lines to your `profile.ps1`.
```
Function SetupProject {
$Location = Read-Host -Prompt 'Enter Path for New Project'
Invoke-Expression -Command "C:\<path to where you cloned this repo>\setup_project_dir.sh $Location"
}
```
Open a new PowerShell instance and type `SetupProject`.
At the prompt, enter the directory path for your new project.

## Similar Projects
I'm not the only one creating similar cookie-cutter projects:
- https://github.com/Reproducible-Science-Curriculum/rr-init
13 changes: 10 additions & 3 deletions setup_project_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ if [ ! -d "$1" ]; then
mkdir $1
fi
cd $1
mkdir doc data src bin results
mkdir doc data src bin outputs
touch .gitignore
cat >> .gitignore << EOF
# Ignore data folder
data/
EOF

cd doc
echo "Doc directory with one subdirectory per manuscript" > README
touch .gitkeep

cd ../data
echo "Data directory for storing fixed data sets" > README
mkdir original wip final
touch .gitkeep

cd ../src
Expand All @@ -33,8 +39,9 @@ cd ../bin
echo "bin for compiled binaries or scripts" > README
touch .gitkeep

cd ../results
echo "Results directory for tracking computational experiments peformed on data" > README
cd ../outputs
echo "Outputs directory for tracking artifacts" > README
mkdir analyses visuals
touch .gitkeep

echo "Folders created."
Expand Down