name change

This commit is contained in:
Kyle Brown 2021-08-18 19:12:58 -07:00
parent 345eb1ae79
commit 2e5316f5b6
9 changed files with 45 additions and 45 deletions

2
.gitignore vendored
View file

@ -3,4 +3,4 @@
*.log
tmp/
worldedit
pmm

View file

@ -1,13 +1,13 @@
##
# worldedit
# pmm
#
# @file
# @version 0.3
SRC = *.nim
SRCDIR = src
BIN = worldedit
MAN = worldedit.1
BIN = pmm
MAN = pmm.1
PREFIX := /usr/local
DESTDIR :=
@ -56,10 +56,10 @@ install:
.PHONY: man
man:
pandoc worldedit.1.md -s -t man | gzip > worldedit.1
pandoc pmm.1.md -s -t man | gzip > pmm.1
.PHONY: testman
testman: man
cat worldedit.1 | man -l -
cat pmm.1 | man -l -
# end

View file

@ -1,4 +1,4 @@
# worldedit
# pmm - Package manager manager
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT
)[![Linux](https://svgshare.com/i/Zhy.svg)](https://svgshare.com/i/Zhy.svg
@ -18,8 +18,8 @@ Arch Linux (AUR)
```bash
pacman -S --needed git base-devel
git clone https://aur.archlinux.org/worldedit-git.git
cd worldedit
git clone https://aur.archlinux.org/pmm-git.git
cd pmm
makepkg -si
```
@ -29,7 +29,7 @@ Directly with Nimble (with url)
```bash
# Install directly with Nimble (with url)
nimble install https://github.com/kdb424/worldedit
nimble install https://github.com/kdb424/pmm
```
or
@ -38,10 +38,10 @@ Manually with Nimble
```bash
# Clone repo
git clone https://github.com/kdb424/worldedit
git clone https://github.com/kdb424/pmm
# go to folder
cd worldedit
cd pmm
# Install (with Nimble)
nimble install -y
@ -49,10 +49,10 @@ nimble install -y
## Usage
```bash
Worldedit.
Pmm.
Usage:
worldedit [options]
pmm [options]
Options:
-h, --help Show this screen.
@ -87,22 +87,22 @@ file in use can be seen below.
### Default worldfile location
```
/etc/worldedit/worldfile
/etc/pmm/worldfile
```
### Overriding the worldfile location
```bash
export WORLDEDIT_WORLD="~/.config/worldedit/world"
export PMM_WORLD="~/.config/pmm/world"
```
### Example
```bash
╭─kdb424@planex ~/.config/worldedit
╭─kdb424@planex ~/.config/pmm
╰─$ ls
amy bluetooth gui laptop openrc planex sway wireless
artix dev guisupport misc pipewire pulse terminal zfs
╭─kdb424@planex ~/.config/worldedit
╭─kdb424@planex ~/.config/pmm
╰─$ cat planex
# Sets
@artix
@ -122,7 +122,7 @@ efibootmgr
piper
radeontop
refind
╭─kdb424@planex ~/.config/worldedit
╭─kdb424@planex ~/.config/pmm
╰─$ cat pulse
pulseaudio
pulseaudio-alsa
@ -133,7 +133,7 @@ pulseeffects-legacy
The example configuration doesn't actually remove packages, but mark them
as orphans. Make sure to clean your system occasionally with
```bash
worldedit --orphans
pmm --orphans
```
## Linux Distros
@ -144,23 +144,23 @@ already, and this tool's functions would conflict with it.
[Alpine world file](https://docs.alpinelinux.org/user-handbook/0.1a/Working/apk.html#_world)
### Arch (and Arch-like distros)
Default commands are below. It will try to detect if `yay` is installed. Worldedit will
Default commands are below. It will try to detect if `yay` is installed. Pmm will
fall back to `sudo pacman` if `yay` is not detected.
```bash
export WORLDEDIT_INSTALL_COMMAND="sudo pacman -S --asexplicit"
export WORLDEDIT_REMOVE_COMMAND="sudo pacman -D --asdeps"
export WORLDEDIT_LIST_COMMAND="sudo pacman -Qqe"
export WORLDEDIT_ORPHANS_COMMAND="pacman -Qtdq | sudo pacman -Rns -"
export PMM_INSTALL_COMMAND="sudo pacman -S --asexplicit"
export PMM_REMOVE_COMMAND="sudo pacman -D --asdeps"
export PMM_LIST_COMMAND="sudo pacman -Qqe"
export PMM_ORPHANS_COMMAND="pacman -Qtdq | sudo pacman -Rns -"
```
### Debian/Ubuntu/Apt
Default commands are below. This relies on apt-mark to get a list of packages, as well as
marking them as orphans or dependencies of other programs.
```bash
export WORLDEDIT_INSTALL_COMMAND="sudo apt install"
export WORLDEDIT_REMOVE_COMMAND="sudo apt-mark auto"
export WORLDEDIT_LIST_COMMAND="sudo apt-mark showmanual | sort -u"
export WORLDEDIT_ORPHANS_COMMAND="sudo apt autoremove"
export PMM_INSTALL_COMMAND="sudo apt install"
export PMM_REMOVE_COMMAND="sudo apt-mark auto"
export PMM_LIST_COMMAND="sudo apt-mark showmanual | sort -u"
export PMM_ORPHANS_COMMAND="sudo apt autoremove"
```
### Gentoo
@ -172,8 +172,8 @@ and is what inspired this project. The world file is located at
### Void
Default commands are below.
```bash
export WORLDEDIT_INSTALL_COMMAND="sudo xbps-install"
export WORLDEDIT_REMOVE_COMMAND="sudo xbps-pkgdb -m auto"
export WORLDEDIT_LIST_COMMAND="sudo xbps-query -m | sed 's/-[0-9].*//g'"
export WORLDEDIT_ORPHANS_COMMAND="sudo xpbs-remove -o"
export PMM_INSTALL_COMMAND="sudo xbps-install"
export PMM_REMOVE_COMMAND="sudo xbps-pkgdb -m auto"
export PMM_LIST_COMMAND="sudo xbps-query -m | sed 's/-[0-9].*//g'"
export PMM_ORPHANS_COMMAND="sudo xpbs-remove -o"
```

View file

@ -1,4 +1,4 @@
#compdef worldedit
#compdef pmm
typeset -A opt_args
local context state line

BIN
pmm.1 Normal file

Binary file not shown.

View file

@ -1,10 +1,10 @@
% worldedit(1)
% pmm(1)
# Name
worldedit - Emulating Gentoo's world files and sets for other package managers.
pmm - Emulating Gentoo's world files and sets for other package managers.
# Synopsis
worldedit [options]
pmm [options]
# DESCRIPTION
Recreates Gentoo's world files for other distros. It hooks the native package manager
@ -64,7 +64,7 @@ opposed to dependencies should be compatible with this application.
: Failure
# BUGS
https://github.com/kdb424/worldedit/issues
https://github.com/kdb424/pmm/issues
# COPYRIGHT
MIT License Copyright (c) 2021 Kyle Brown

View file

@ -5,7 +5,7 @@ author = "Kyle Brown"
description = "Gentoo's world file, but everywhere."
license = "MIT"
srcDir = "src"
bin = @["worldedit"]
bin = @["pmm"]
# Dependencies

View file

@ -10,10 +10,10 @@ import strutils
import typetraits
let doc = """
worldedit - Emulating Gentoo's world files and sets for other package managers.
pmm - Emulating Gentoo's world files and sets for other package managers.
Usage:
worldedit [options]
pmm [options]
Options:
-h, --help Show this screen.
@ -32,7 +32,7 @@ Options:
--orphans Removes things marked as orphans from your system
"""
type
Worldedit = object
Pmm = object
install, installCommand, listCommand, orphansCommand, remove, removeCommand, world: string
bash, diff, init, orphans, sync: bool
@ -106,9 +106,9 @@ proc createWorldFile(worldFile: string, listCommand: string) =
writeFile(worldFile, world.join(sep = "\n"))
when isMainModule:
var config = getEnvConfig(Worldedit)
var config = getEnvConfig(Pmm)
let args = docopt(doc, version = "Worldedit 0.3.3")
let args = docopt(doc, version = "Pmm 0.3.3")
if args["--worldfile"]: config.world = $args["--worldfile"]
if args["--list-command"]: config.listCommand = $args["--list-command"]
if args["--install-command"]: config.installCommand = $args["--install-command"]
@ -123,7 +123,7 @@ when isMainModule:
if args["--orphans"]: config.orphans = parseBool($args["--orphans"])
if config.world.isEmptyOrWhitespace:
config.world = "/etc/worldedit/worldfile"
config.world = "/etc/pmm/worldfile"
else:
config.world = config.world.expandTilde

Binary file not shown.