Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wallentx committed Mar 6, 2023
1 parent 182f512 commit b5a8bf3
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 119 deletions.
81 changes: 0 additions & 81 deletions .github/README.md

This file was deleted.

2 changes: 1 addition & 1 deletion .github/updateMd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ while read -r AISLE; do
GHFILENAME=$(basename "$CRATE")
AISLE_NUM=$(basename "$AISLE")
DESCRIPTION=$(sed -n 's/^## Description: //p' "$CRATE")
echo -e " - 📄 [${GHFILENAME//-/\\-}](/$AISLE_NUM/$GHFILENAME)" >> "$PROJECT_ROOT"/README.md
echo -e " - 📄 [${GHFILENAME//-/\\-}](bin/$AISLE_NUM/$GHFILENAME)" >> "$PROJECT_ROOT"/README.md
if [[ -n "$DESCRIPTION" ]]; then
echo -e " - _${DESCRIPTION}_" >> "$PROJECT_ROOT"/README.md
fi
Expand Down
16 changes: 14 additions & 2 deletions bin/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# to-do:
## Usage

1. Descriptions
#### Adding Supplies

Add a script to the `bin` directory

#### Auto-updating README.md

The Supplies Index of this `README.md` file updates automatically when an Actions Script is added, or modified. In order for the description of an item to be displayed, the file must contain the following string on a single line anywhere within the file:

`## Description: <Your description here on a single line>`

# Supply Index

- 📂 __bin__
45 changes: 20 additions & 25 deletions bin/config-management/almanac
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,25 @@ yq '.pool.pool_list' "$CH_CFG_PATH" -s '"/tmp/tmppool"'
python -m pyaml "$TMPNOPOOL" > "$TMPCUR"
python -m pyaml "$CH_CFG_INIT" > "$TMPNEW"

VIMDIFF_CONTROLS=$(cat <<- EOF
VIMDIFF CONTROLS
]c - advance to the next block with differences
[c - reverse search for the previous block with differences
do (diff obtain) - bring changes from the other file to the current file
dp (diff put) - send changes from the current file to the other file
zo - unfold/unhide text
zc - refold/rehide text
zr - unfold both files completely
zm - fold both files completely
NOTE ABOUT DIFF OBTAIN/PUT CONTROL:
- Normal Mode: Use "do" and "dp" controls when your cursor is on, or just one line under a block.
- Visual Mode: Use ":'<,'>diffget" and ":'<,'>diffput" when selecting lines of text.
See also ":h copy-diffs".
":diffupdate" will re-scan the files for changes.
When you are finished editing, press "escape", and enter ":wqa" and press "enter".
VIMDIFF_CONTROLS=$(bat -Ppl cmd-help <<- EOF
^[[38;5;186mVIMDIFF CONTROLS ~^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m ]c | advance to the next block with differences |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m [c | reverse search for the previous block with differences |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m do | bring changes from the other file to the current file |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m dp | send changes from the current file to the other file |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m zo | unfold/unhide text |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m zc | refold/rehide text |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m zr | unfold both files completely |^[[0m
^[[38;5;203m|^[[0m^[[38;5;231m zm | fold both files completely |^[[0m
^[[38;5;203mNOTE ABOUT DIFF OBTAIN/PUT CONTROL^[[0m^[[38;5;231m:^[[0m
^[[38;5;231m-^[[0m^[[38;5;231m ^[[0m^[[38;5;203mNormal Mode^[[0m^[[38;5;231m:^[[0m^[[38;5;231m ^[[0m^[[38;5;186mUse "do" and "dp" controls when your cursor is on, or just one line under a block.^[[0m
^[[38;5;231m-^[[0m^[[38;5;231m ^[[0m^[[38;5;203mVisual Mode^[[0m^[[38;5;231m:^[[0m^[[38;5;231m ^[[0m^[[38;5;186mUse ":'<,'>diffget" and ":'<,'>diffput" when selecting lines of text.^[[0m
^[[38;5;231m ^[[0m^[[38;5;186mSee also ":h copy-diffs".^[[0m
^[[38;5;186m"^[[0m^[[38;5;186m:diffupdate^[[0m^[[38;5;186m"^[[0m^[[38;5;231m ^[[0m^[[38;5;186mwill re-scan the files for changes.^[[0
^[[38;5;186mWhen you are finished editing, press "escape", and enter ":wqa" and press "enter".^[[0m
EOF
)
Expand All @@ -91,7 +86,7 @@ echo "and"
echo "$CH_CFG_INIT"
echo "This will open in $TOOL."
if [[ $TOOL == "vimdiff" ]]; then
echo "$VIMDIFF_CONTROLS"
echo -e "$VIMDIFF_CONTROLS"
echo ""
fi
read -rp "Press enter to continue."
Expand Down
11 changes: 7 additions & 4 deletions bin/extra/proofdistrib
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
## Description: Show (or graph) eligible plot distribution per Proof Check, by occurrence.

# Manually set this if you want to display plot count
COUNT=true
CHIAPATH="$HOME/chia-blockchain"
COUNT=false
CHIAPATH="$HOME/chia-blockchain-1.2.11"
if [[ $COUNT == true ]] && [[ ! -z $CHIAPATH ]]; then
source $CHIAPATH/activate
PLOTCOUNT=$(chia farm summary | grep 'plots of size' | grep -o '[^$(printf '\t') ].*')
fi

LOGPATH="$HOME/.chia/mainnet/log/debug.log*"
LOGPATH="$HOME/.chia/mainnet/log/harvester-debug.log*"

if [[ ! $(ls -A $LOGPATH) ]]; then
echo "No files found at $LOGPATH"
Expand All @@ -29,7 +29,7 @@ plottery() {
grep -o 'Found.*proofs' | \
sort | \
uniq -c | \
awk -F" " '{print " ", $3"\t", "┃ ", $1}'
awk -F" " '{print "", $3"\t", "┃ ", $1}'

# grep -o 'Found.*proofs' "$LOGPATH" | \
# sort | \
Expand All @@ -51,7 +51,10 @@ showdistrib() {
━━━━╋━━━━
EOF

#sort | uniq -c | awk -F" " '{print " ", $3"\t", "┃ ", $1}' | column -t

plottery | column -t | \
# sort | uniq -c | awk -F" " '{print " ", $3"\t", "┃ ", $1}' | column -t
# awk '{print $1}' | \
# tail +4 | \
# sort -n | \
Expand Down
11 changes: 6 additions & 5 deletions bin/final-plot-management/plot/Excavator
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ MOUNT_LIST="/tmp/$(basename "$0")-mounts.$$.list"
FindMounts() {
echo "Finding plot locations..."
"$CHIA_ROOT"/venv/bin/chia plots show | \
grep 'solo\|pool' | \
grep 'mnt' | xargs -I {} bash -c 'find {} -type d -name "plots*"' | \
# grep 'solo\|pool' | \
# sed 's,/*[^/]\+/*$,,' | \
sort -R >"$MOUNT_LIST"
}
Expand Down Expand Up @@ -135,10 +136,10 @@ IterateMounts() {
PLOTCOUNT="$((AVAIL / PLOTSIZE))"
echo "Evaluating mount..."
if [[ $PLOTCOUNT -gt 0 ]]; then
echo "Moving $WENDY_INODE to $TARGET/..."
rsync -a --remove-source-files "$WENDY_INODE" "$TARGET"/"$PLOTNAME"
if [[ -f "$TARGET"/"$PLOTNAME" ]]; then
echo "$PLOTNAME has been moved to $TARGET/, and is ready for farming!"
echo "Moving $WENDY_INODE to $TARGET/pool/..."
rsync -a --remove-source-files "$WENDY_INODE" "$TARGET"/pool/"$PLOTNAME"
if [[ -f "$TARGET"/pool/"$PLOTNAME" ]]; then
echo "$PLOTNAME has been moved to $TARGET/pool/, and is ready for farming!"
exit 0
fi
break 2
Expand Down
2 changes: 1 addition & 1 deletion bin/mm/xplot
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ TEMP2=${4:-$TEMP1}
SCK=$(cat ~/.ssh/sck)
FPK=$(cat ~/.ssh/fpk)

nohup chia_plot -c "$SCK" -f "$FPK" -n "$COUNT" -r "$CORES" -K 2 -u 512 -v 512 -t "$TEMP1" -2 "$TEMP2" -d "$TEMP1" | systemd-cat -t xplot &
nohup chia_plot -c "$SCK" -f "$FPK" -n "$COUNT" -r "$CORES" -K 2 -u 512 -v 512 -t "$TEMP1" -2 "$TEMP2" -d "$TEMP1" -D true | systemd-cat -t xplot &

0 comments on commit b5a8bf3

Please sign in to comment.