Pdfutils

Latest version: v1.1.3

Safety actively analyzes 620800 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

09.09.09

CV=( ${CURRENT_VERSION//./ } )
CURRENT_MAJOR=${CV[0]}
CURRENT_MINOR=${CV[1]}
CURRENT_REV=${CV[2]}

NEXT_MAJOR=$CURRENT_MAJOR
NEXT_MINOR=$CURRENT_MINOR
NEXT_REV=`expr $CURRENT_REV + 1`
if [ $NEXT_REV -gt 9 ]; then
NEXT_MINOR=`expr $NEXT_MINOR + 1`
NEXT_REV=0
if [ $NEXT_MINOR -gt 9 ]; then
NEXT_MINOR=0
NEXT_MAJOR=`expr $NEXT_MAJOR + 1`
fi
fi
NEXT_VERSION="$NEXT_MAJOR.$NEXT_MINOR.$NEXT_REV"
BRANCH="release_${NEXT_MAJOR}_${NEXT_MINOR}"

echo "You are about to build and publish version $NEXT_VERSION"
read -sn 1 -p "Press any key to continue..."
echo

Make sure we are in sync with remote
git checkout -q master && git fetch -q && git pull -q

Verify that there is nothing to commit
if [ $(git_is_dirty) -eq 1 ]; then
git status
echo
echo -e " [error] Hey dumbass, commit your shit.. Abort !\n\n"
exit 1
fi

Verify that there is no untracked files
if [ $(git_has_untracked_files) -gt 0 ]; then
git status
echo
echo -e " [error] I see untracked files, you dirty bastard.. Abort !\n\n"
exit 1
fi

echo " [info] Bumping version"
sed -i -e "s/ version='"$CURRENT_VERSION"',/ version='"$NEXT_VERSION"',/" setup.py
git commit -aqm "Version bump: $CURRENT_VERSION -> $NEXT_VERSION wip"
git push -q

echo " [info] Creating tag v$NEXT_VERSION"
git tag -s "v$NEXT_VERSION" -m "Release $NEXT_VERSION"
git push --tags origin "v$NEXT_VERSION"

echo " [info] Updating changelog"
if [ ! -d "./venv" ]; then
virtualenv venv
fi
./venv/bin/pip install -q gitchangelog
./venv/bin/gitchangelog > changelog
rm -rf venv
git add changelog
git commit -qm "Updated changelog wip"
git push -q

check if a git branch exists for the current major_minor release (ex: release_1_0)
if [ `git branch --list $BRANCH` ]; then if not, create one.
echo " [info] UPDATING release branch $BRANCH"
git checkout -q $BRANCH
git merge -q origin/master
else
echo " [info] CREATING release branch $BRANCH"
git checkout -q -b $BRANCH
fi
git push -q --set-upstream origin $BRANCH > /dev/null
git checkout -q master

echo " [info] Pushing to PyPi"
python setup.py sdist build upload

echo " [done] Published release v$NEXT_VERSION"
echo
exit 0


Changelog
=========

1.1.3

-------------------

- Merge pull request 7 from dominicmontreuil/patch-4. [Maxime
Haineault]

Letting base manage styles

- Letting base manage styles. [Dominic Montreuil]

Mangling self.styles to self.__styles should let classes subclassing ReportBase know that you shouldn't add to styles directly and let the base class manage them.

The reason in this case is to let ReportBase handle the styles and work around the threadlock issues by cleaning the styles prior to a new report being executed. Doing so has the effect of minimizing work in the utils.unique method making sure that before each report execution we have a minimum or more explicitely the relevant styles for our current report.

Classes subclassing ReportBase should use the append_styles(self, styles) method instead of appending to styles directly.

- Merge pull request 9 from dominicmontreuil/patch-3. [Maxime
Haineault]

Better practice in utils.py

- Better practice in utils.py. [Dominic Montreuil]

The link_callback wasn't really used...although it didn't cause harm either.

generate_pdf and generate_pdf_template_object didn't return anything useful and whatever they returned wasn't used anyways. Pisa documentation recommends that such functions/methods return the generation errors for exception catching. Not implemented here, but just an overall better practice.

Also is the addition of file_object.close(). You should manually close your StringIO objects as in some reported errors not closing them was the cause for massive slowdowns and hungry ressource usage by xhtml2pdf.

All the recommended changes here are optional, but the StringIO manual close is recommended very highly to Pisa/xhtml2pdf users.

1.0.9

-------------------

- Fixed setup.py. [Maxime Haineault]

1.0.8

-------------------

- Fixed important memory leak in style loading (thanks Dom) [Maxime
Haineault]

1.0.7

-------------------

- Merge pull request 3 from dulaccc/format-filter. [Maxime Haineault]

Add a format filter to simplify debugging

- Add a filter using GET parameters to simplify debugging. [Pierre
Dulac]

- Add autodiscover step to the readme file. [Pierre Dulac]

- Merge branch 'dulaccc-add-url-name' [Maxime Haineault]

- Add a url name property to the urlpattern generated. [Maxime
Haineault]

- Add a url name property to the urlpattern generated. [Pierre Dulac]

- Merge branch 'dulaccc-fix-resource-remote-url' [Maxime Haineault]

- .. [Maxime Haineault]

- Let pisa handle remote resources. [Pierre Dulac]

- Merge pull request 6 from dominicmontreuil/patch-1. [Maxime
Haineault]

Update setup.py wip

- Update setup.py. [Dominic Montreuil]

I needed to use pdfutils along with another package that required httplib2 0.9 or higher.

I tested pdfutils with httplib2 0.9 and everything works. It should be safe to update to the newer version of httplib2.

- Cleaning up venv after build. [Maxime Haineault]

1.0.6

-------------------

- Cleanup. [Maxime Haineault]

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.