The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Compare commits

...

No commits in common. 'main' and 'gh-pages' have entirely different histories.

  1. 120
      .gitignore
  2. 17
      .travis.yml
  3. 2
      Gemfile
  4. 39
      Makefile.am
  5. 155
      README.md
  6. 63
      autogen.sh
  7. 182
      configure.ac
  8. 16
      data/Makefile.am
  9. 22
      data/gschema.template
  10. 11
      data/swe-glib.pc.in
  11. 93
      data/swe-glib.spec.in
  12. 117
      docs/reference/swe-glib/Makefile.am
  13. 52
      docs/reference/swe-glib/swe-glib-docs.xml
  14. 331
      docs/reference/swe-glib/swe-glib-sections.txt
  15. 1
      docs/reference/swe-glib/version.xml.in
  16. 52
      examples/basic.js
  17. 44
      examples/basic.lua
  18. 55
      examples/basic.pl
  19. 44
      examples/basic.py
  20. BIN
      images/code.png
  21. BIN
      images/pattern.png
  22. BIN
      images/tar.png
  23. BIN
      images/top.png
  24. BIN
      images/zip.png
  25. 184
      index.html
  26. 52
      javascripts/script.js
  27. 1
      params.json
  28. 2
      po/LINGUAS
  29. 53
      po/Makevars
  30. 3
      po/POTFILES.in
  31. 224
      po/hu.po
  32. 120
      src/Makefile.am
  33. 46
      src/gswe-antiscion-axis-info-private.h
  34. 290
      src/gswe-antiscion-axis-info.c
  35. 88
      src/gswe-antiscion-axis-info.h
  36. 48
      src/gswe-antiscion-data-private.h
  37. 425
      src/gswe-antiscion-data.c
  38. 78
      src/gswe-antiscion-data.h
  39. 51
      src/gswe-aspect-data-private.h
  40. 350
      src/gswe-aspect-data.c
  41. 76
      src/gswe-aspect-data.h
  42. 53
      src/gswe-aspect-info-private.h
  43. 282
      src/gswe-aspect-info.c
  44. 78
      src/gswe-aspect-info.h
  45. 65
      src/gswe-enumtypes.c.template
  46. 42
      src/gswe-enumtypes.h.template
  47. 44
      src/gswe-house-data-private.h
  48. 165
      src/gswe-house-data.c
  49. 53
      src/gswe-house-data.h
  50. 45
      src/gswe-house-system-info-private.h
  51. 189
      src/gswe-house-system-info.c
  52. 71
      src/gswe-house-system-info.h
  53. 1903
      src/gswe-moment.c
  54. 199
      src/gswe-moment.h
  55. 40
      src/gswe-moon-phase-data-private.h
  56. 206
      src/gswe-moon-phase-data.c
  57. 66
      src/gswe-moon-phase-data.h
  58. 53
      src/gswe-planet-data-private.h
  59. 306
      src/gswe-planet-data.c
  60. 74
      src/gswe-planet-data.h
  61. 55
      src/gswe-planet-info-private.h
  62. 268
      src/gswe-planet-info.c
  63. 79
      src/gswe-planet-info.h
  64. 47
      src/gswe-sign-info-private.h
  65. 208
      src/gswe-sign-info.c
  66. 60
      src/gswe-sign-info.h
  67. 1778
      src/gswe-timestamp.c
  68. 213
      src/gswe-timestamp.h
  69. 45
      src/gswe-types.c
  70. 349
      src/gswe-types.h
  71. 91
      src/gswe-version.c
  72. 37
      src/gswe-version.h.in
  73. 48
      src/swe-glib-private.h
  74. 927
      src/swe-glib.c
  75. 78
      src/swe-glib.h
  76. 69
      stylesheets/pygment_trac.css
  77. 581
      stylesheets/stylesheet.css
  78. 132
      swe-glib.mk
  79. 10
      tests/Makefile.am
  80. 327
      tests/gswe-timestamp-test.c
  81. 66
      tests/test-asserts.h

120
.gitignore vendored

@ -1,118 +1,2 @@
# General ignore rules
.deps/
.libs/
*~
*.bak
.*.sw?
*.o
*.lo
*.la
/tags
/*.orig
/*.rej
/*.tab.c
/.dirstamp
*.gir
*.typelib
*.gschema.valid
ChangeLog
# Files created by the build tools
Makefile
Makefile.in
/GPATH
/GRTAGS
/GSYMS
/GTAGS
/ID
/TAGS
/_libs
/config.cache
/config.h
/config.h.in
/aclocal.m4
/ar-lib
/ltmain.sh
/autom4te.cache/
/m4/
/missing
/stamp-h1
/config.guess
/config.log
/config.rpath
/config.lt
/config.status
/config.sub
/config.status.lineno
/configure
/depcomp
/install-sh
/configure.lineno
/libtool
/compile
/so_locations
# Testing related files
/test-driver
/tests/*-test
/tests/*-test.log
/tests/*-test.trs
/swe-glib-lcov*
test-suite.log
*.gcno
*.gcda
*.gcov
# Translation related files
/ABOUT-NLS
/po/POTFILES
/po/Makevars.template
/po/Makefile.in.in
/po/stamp-it
/po/*.gmo
/po/*.mo
/po/*.pot
/po/Rules-quot
/po/boldquot.sed
/po/en@boldquot.header
/po/en@quot.header
/po/insert-header.sin
/po/quot.sed
/po/remove-potcdate.sin
/po/.intltool-merge-cache
/intltool-extract
/intltool-extract.in
/intltool-merge
/intltool-merge.in
/intltool-update
/intltool-update.in
# SWE-GLib related files
/src/gswe-enumtypes.c
/src/gswe-enumtypes.h
/src/gswetest
/data/swe-glib.pc
/data/swe-glib.spec
/src/*.vapi
/src/gswe-version.h
/data/*.gschema.xml
# Documentation related files
/docs/reference/*/*.actions
/docs/reference/*/*.args
/docs/reference/*/*.hierarchy
/docs/reference/*/*.interfaces
/docs/reference/*/*.prerequisites
/docs/reference/*/*.signals
/docs/reference/*/*.stamp
/docs/reference/*/*.types
/docs/reference/*/*-decl-list.txt
/docs/reference/*/*-decl.txt
/docs/reference/*/*-overrides.txt
/docs/reference/*/*-undeclared.txt
/docs/reference/*/version.xml
/docs/reference/*/*-undocumented.txt
/docs/reference/*/*-unused.txt
/docs/reference/*/xml/
/docs/reference/*/html/
/gtk-doc.make
Gemfile.lock
/_site/

@ -1,17 +0,0 @@
sudo: false
language: c
addons:
apt:
packages:
- libglib2.0-dev
- gobject-introspection
- gnome-common
- autopoint
before_script: ./autogen.sh
script:
- make
- make check
before_install:
- pip install --user codecov
after_success:
- codecov

@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'github-pages'

@ -1,39 +0,0 @@
include $(top_srcdir)/swe-glib.mk
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src po data tests
if ENABLE_GTK_DOC
SUBDIRS += docs/reference/swe-glib
endif
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
intltool_extra = intltool-extract.in intltool-merge.in intltool-update.in
EXTRA_DIST += $(intltool_extra) $(header_DATA) autogen.sh
DISTCLEANFILES += intltool-extract intltool-merge intltool-update
MAINTAINERCLEANFILES += ChangeLog
distclean-local:
if test "$(srcdir)" = "."; then :; else \
rm -f ChangeLog; \
fi
ChangeLog:
$(AM_V_GEN) if test -d "$(srcdir)/.git"; then \
(GIT_DIR=$(top_srcdir)/.git ./missing --run git log -M -C --name-status --date=short --no-color) | fmt --split-only > $@.tmp \
&& mv -f $@.tmp $@ \
|| ($(RM) $@.tmp; \
echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
(test -f $@ || echo git log is required to generate this file >> $@)); \
else \
test -f $@ || \
(echo A git checkout and git log is required to generate ChangeLog >&2 && \
echo A git checkout and git log is required to generate this file >> $@); \
fi
.PHONY: ChangeLog

@ -1,155 +0,0 @@
# SWE-GLib
[![Build Status](https://travis-ci.org/gergelypolonkai/swe-glib.svg?branch=master)](https://travis-ci.org/gergelypolonkai/swe-glib)
[![codecov.io](https://codecov.io/github/gergelypolonkai/swe-glib/coverage.svg?branch=master)](https://codecov.io/github/gergelypolonkai/swe-glib?branch=master)
SWE-GLib is a GLib style wrapper library around Astrodienst's
[Swiss Ephemeris library](http://www.astro.com/swisseph/).
The source tree contains Astrodienst's ephemeride files, as requested
by Alois Treindl of Astrodienst in a mail written to me on 24 July,
2013.
## GTK-Doc
The project utilizes [GTK-Doc](http://www.gtk.org/gtk-doc/), requiring
version 1.19 or later. Although the generated documentation is a bit
messy (not everything is documented, and there are some unresolved
variables, like [SERVER] on the generated index page.
Still, the documentation generates well, and at least gives a clue
about object usage.
## Bindings
SWE-GLib utilizes
[GObject Introspection](https://wiki.gnome.org/GObjectIntrospection),
which means it is available for many languages. Check out the
[examples](examples) directory for some sample code!
## Usage
Many functions return non-opaque C structs; their documentation can be
found inline, and in the generated GTK-Doc. Unless otherwise stated,
the returned values should never be freed.
### Creating the required objects
Then you need to create a `GsweTimestamp` object:
```c
GsweTimestamp *timestamp = gswe_timestamp_new_from_gregorian_full(1983, 3, 7, 11, 54, 45, 0, 1.0);
```
The `GsweTimetamp` object is used to convert dates between the Gregorian calendar dates and Julian Day values (not to be confused with Julian calendar dates).
Next, you have to create a `GsweMoment` object:
```c
GsweMoment *moment = gswe_moment_new_full(timestamp, 19.081599, 47.462485, 300.0, GSWE_HOUSE_PLACIDUS);
```
The `GsweMoment` object holds information of a given moment at a given place on earth. `gswe_moment_new_full()` requires a `GsweTimestamp` object, some geographical coordinates (in degrees) together with altitude above sea level (in meters), and a house system to use.
### Adding planets
After that you have to add some planets you want to do calculations on.
```c
gswe_moment_add_planet(moment, GSWE_PLANET_SUN);
```
Alternatively, you can add every planets known by SWE-GLib with
```c
gswe_moment_add_all_planets(moment);
```
### Getting planet positions and such
Then, you can get the planet data with
```c
GswePlanetData *sun_data = gswe_moment_get_planet(moment, GSWE_PLANET_SUN);
```
### Getting aspects and antiscia
SWE-GLib is also able to calculate aspects and antiscia. This functionality does not exist in the Swiss Ephemeris library, though. For this, of course, you have to add multiple planets (at least two) to your `GsweMoment`. After that, you can call `gswe_moment_get_planet_aspects()` and `gswe_moment_get_planet_antiscia()`.
```c
GList *sun_aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_SUN);
GList *sun_antiscia = gswe_moment_get_planet_antiscia(moment, GSWE_PLANET_SUN);
```
The returned GList objects hold zero or more `GsweAspectData` or
`GsweAntiscionData` objects, respectively.
### Getting the Moon phase
Last, but not least, SWE-GLib can calculate Moon's phase at the given
moment. For that, you have to call `gswe_moment_get_moon_phase()`:
```c
GsweMoonPhaseData *moon_phase = gswe_moment_get_moon_phase(moment);
```
### About altitude
The Swiss Ephemeris library requires the altitude value to be
specified for several calculations. It also notifies how important it
is:
> the altitude above sea must be in meters. Neglecting the altitude
> can result in an error of about 2 arc seconds with the moon and at
> an altitude 3000m.
2 arc seconds is about 0.000555 degrees of error, which is, well, kind
of small. Of course, if you need very precise horoscopes or need
planetary positions for a totally different thing, you should really
provide a (close to) exact value; otherwise, it is safe to pass any
value (well, which seems logical: the average level of all dry lands
is about 840 meters; the average level of the whole planet Earth
(including oceans and seas) is around 280 meters. Providing a value of
~400 should be OK most of the time).
## API stability
The project is currently transitioning to 2.0. master is a bit fragile
at the moment, 1.x versions are considered to be stable (although see
commit 8f52aba about a huge typo-bug).
## Limitations
### Topocentric calculations only
Although the original Swiss Ephemeris library supports it, SWE-GLib
can't do Heliocentric, nor Geocentric (as seen from the center of
Earth) calculations, only Topocentric (as seen from a given point on
Earth’s surface) calculations yet.
### Database size
The size of all data files provided by Astrodienst is around
40MB. Although it should not be a problem with today's home hardware,
it can be a hard requirement on embedded systems. For basic
calculations, keeping the following files under $(datadir)/swe-glib is
usually enough:
* `seas_18.se1`
* `semo_18.se1`
* `sepl_18.se1`
### Fixed stars are not known yet
Although Swiss Ephemeris has the functionality to calculate the
position of fixed stars, SWE-GLib doesn't provide such
functionality. This, however, is a planned feature for the close
future.
## Licencing
As the underlying Swiss Ephemeris is published under GPL (or a
commercial license I can not afford), SWE-GLib is also uses that. This
means that you can currently use SWE-GLib in software published under
the GNU GPL v3 (or, at your option, any later version).

@ -1,63 +0,0 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
PKG_NAME="swe-glib"
(test -f $srcdir/configure.ac \
&& test -f $srcdir/src/swe-glib.c) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
echo " top-level $PKG_NAME directory"
exit 1
}
m4dir=`grep '^AC_CONFIG_MACRO_DIR' configure.ac | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
if [ -n "$m4dir" ]; then
m4dir="-I $m4dir"
fi
echo "Running libtoolize"
libtoolize --force --copy || exit $?
echo "Running autopoint"
autopoint --force || exit $?
echo "Running intltoolize"
intltoolize --force --copy --automake || exit $?
GTKDOCIZE=$(which gtkdocize 2>/dev/null)
if test -z $GTKDOCIZE; then
echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
rm -f gtk-doc.make
rm -f $m4dir/gtk-doc.m4
cat > gtk-doc.make <<EOF
EXTRA_DIST =
CLEANFILES =
EOF
else
echo "Running gtkdocize"
gtkdocize --copy || exit $?
fi
echo "Running aclocal"
aclocal $m4dir $ACLOCAL_FLAGS || exit $?
echo "Running autoconf"
autoconf || exit $?
if grep "^A[CM]_CONFIG_HEADER" configure.ac >/dev/null; then
echo "Running autoheader"
autoheader || exit $?
# this prevents automake from thinking config.h.in is out of
# date, since autoheader doesn't touch the file if it doesn't
# change.
test -f config.h.in && touch config.h.in
fi
echo "Running automake"
automake --gnu --add-missing --copy -Wno-portability || exit $?
"$srcdir/configure" "$@"

@ -1,182 +0,0 @@
m4_define([swe_glib_major_version], [2])
m4_define([swe_glib_minor_version], [1])
m4_define([swe_glib_micro_version], [0])
m4_define([swe_glib_version], [swe_glib_major_version.swe_glib_minor_version.swe_glib_micro_version])
m4_define([swe_glib_api_version], [swe_glib_major_version.0])
m4_define([swe_major_version], [2])
m4_define([swe_minor_version], [0])
m4_define([swe_version], [swe_major_version.swe_minor_version])
AC_INIT([SWE-GLib], [swe_glib_version], [gergely@polonkai.eu], [swe-glib])
AM_INIT_AUTOMAKE([-Wall foreign])
AC_CONFIG_HEADERS([config.h])
AM_SILENT_RULES([yes])
dnl ********************************
dnl *** Enable debugging support ***
dnl ********************************
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[compile with debugging support]),
[enable_debug=$enableval], [enable_debug=no])
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE([DEBUG], [1], [Define if debugging is enabled])
if test x$cflags_set != xset ; then
case " $CFLAGS " in
*[[\ \ ]]-g[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -g" ;;
esac
fi
fi
AC_SUBST([SWE_GLIB_MAJOR_VERSION], [swe_glib_major_version])
AC_SUBST([SWE_GLIB_MINOR_VERSION], [swe_glib_minor_version])
AC_SUBST([SWE_GLIB_MICRO_VERSION], [swe_glib_micro_version])
AC_SUBST([SWE_GLIB_VERSION], [swe_glib_version])
AC_SUBST([SWE_GLIB_API_VERSION], [swe_glib_api_version])
AC_SUBST([SWE_GLIB_API_VERSION_U], [AS_TR_SH([swe_glib_api_version])])
AC_SUBST([SWE_VERSION], [swe_version])
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_AR
AC_PROG_LIBTOOL
IT_PROG_INTLTOOL([0.35.0])
GETTEXT_PACKAGE=swe-glib
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [GETTEXT package name])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
LT_INIT
AC_CHECK_LIB([m], [atan])
m4_ifdef([GTK_DOC_CHECK], [
GTK_DOC_CHECK([1.19], [--flavour no-tmpl])
],[
AM_CONDITIONAL([ENABLE_GTK_DOC], false)
])
GOBJECT_INTROSPECTION_CHECK([1.0])
m4_ifdef([VALA_PROG_VAPIGEN], [
VALA_PROG_VAPIGEN([0.21])
AM_CONDITIONAL([HAVE_VAPIGEN], true)
],[
AM_CONDITIONAL([HAVE_VAPIGEN], false)
])
PKG_PROG_PKG_CONFIG
AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
AC_CANONICAL_HOST
native_win32=no
case "$host" in
*-*-mingw*)
native_win32=yes
;;
esac
AM_CONDITIONAL(OS_WIN32, [test "$native_win32" = "yes"])
AM_CONDITIONAL(OS_UNIX, [test "$native_win32" != "yes"])
AC_PATH_PROG([GTESTER], [gtester])
AC_PATH_PROG([GTESTER_REPORT], [gtester-report])
dnl ************************************
dnl *** Enable lcov coverage reports ***
dnl ************************************
AC_ARG_ENABLE(coverage,
AS_HELP_STRING([--enable-coverage],
[enable coverage testing with gcov]),
[use_gcov=$enableval], [use_gcov=no])
AS_IF([ test "x$use_gcov" = "xyes"], [
dnl we need gcc:
if test "$GCC" != "yes"; then
AC_MSG_ERROR([GCC is required for --enable-coverage])
fi
dnl Check if ccache is being used
AC_CHECK_PROG(SHTOOL, shtool, shtool)
case `$SHTOOL path $CC` in
*ccache*[)] gcc_ccache=yes;;
*[)] gcc_ccache=no;;
esac
if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
AC_MSG_ERROR([ccache must be disabled when --enable-coverage option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
fi
ltp_version_list="1.6 1.7 1.8 1.9 1.10 1.14"
AC_CHECK_PROG(LTP, lcov, lcov)
AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
AS_IF([ test "$LTP" ], [
AC_CACHE_CHECK([for ltp version], sw_glib_cv_ltp_version, [
swe_glib_cv_ltp_version=invalid
ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
for ltp_check_version in $ltp_version_list; do
if test "$ltp_version" = "$ltp_check_version"; then
swe_glib_cv_ltp_version="$ltp_check_version (ok)"
fi
done
])
], [
ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
AC_MSG_ERROR([$ltp_msg])
])
case $swe_glib_cv_ltp_version in
""|invalid[)]
ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
AC_MSG_ERROR([$ltp_msg])
LTP="exit 0;"
;;
esac
if test -z "$LTP_GENHTML"; then
AC_MSG_ERROR([Could not find genhtml from the LTP package])
fi
dnl Remove all optimization flags from CFLAGS
changequote({,})
CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
changequote([,])
dnl Add the special gcc flags
CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
LDFLAGS="$LDFLAGS -lgcov"
])
if test "x$enable_debug" = "xyes" ; then
AC_DEFINE([DEBUG], [1], [Define if debugging is enabled])
if test x$cflags_set != xset ; then
case " $CFLAGS " in
*[[\ \ ]]-g[[\ \ ]]*) ;;
*) CFLAGS="$CFLAGS -g" ;;
esac
fi
fi
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.32.0])
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.32.0])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26])
GLIB_GSETTINGS
AC_CONFIG_MACRO_DIR([m4])
LIBSWE_GLIB_LIBS='$(top_builddir)/src/libswe-glib-$(SWE_GLIB_API_VERSION).la'
AC_SUBST(LIBSWE_GLIB_LIBS)
AC_CONFIG_FILES([
Makefile
src/Makefile
data/Makefile
po/Makefile.in
tests/Makefile
data/swe-glib.pc
data/swe-glib.spec
src/gswe-version.h
])
AM_COND_IF([ENABLE_GTK_DOC], [
AC_CONFIG_FILES([
docs/reference/swe-glib/version.xml
docs/reference/swe-glib/Makefile
])
])
AC_OUTPUT

@ -1,16 +0,0 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = swe-glib.pc $(NULL)
eu.polonkai.gergely.swe-glib.gschema.xml: gschema.template $(top_builddir)/src/gswe-types.h
$(GLIB_MKENUMS) --comments "<!-- @comment@ -->" --template $(filter %.template,$^) $(filter-out %.template,$^) > \
$@.tmp && mv $@.tmp $@
gsettings_SCHEMAS = eu.polonkai.gergely.swe-glib.gschema.xml
@GSETTINGS_RULES@
EXTRA_DIST = \
swe-glib.spec \
gschema.template
DISTCLEANFILES = $(gsettings_SCHEMAS)

@ -1,22 +0,0 @@
/*** BEGIN file-header ***/
<schemalist>
/*** END file-header ***/
/*** BEGIN file-production ***/
/*** END file-production ***/
/*** BEGIN value-header ***/
<enum id="eu.polonkai.gergely.swe-glib.@EnumName@">
/*** END value-header ***/
/*** BEGIN value-production ***/
<value nick="@valuenick@" value="@valuenum@"/>
/*** END value-production ***/
/*** BEGIN value-tail ***/
</enum>
/*** END value-tail ***/
/*** BEGIN file-tail ***/
</schemalist>
/*** END file-tail ***/

@ -1,11 +0,0 @@
prefix=@prefix@
exec_prefix = @exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: SWE-GLib
Description: GLib wrapper functions for the Swiss Ephemeris library
Version: @VERSION@
Requires: glib-2.0
Libs: -L${libdir} -lswe-glib-@SWE_GLIB_API_VERSION@
Cflags: -I${includedir}/swe-glib

@ -1,93 +0,0 @@
Name: swe-glib
Version: @SWE_GLIB_VERSION@
Release: 1%{?dist}
Summary: A GLib style wrapper library around the Swiss Ephemeris library, created by Astrodienst.
Group: Development/Libraries
License: LGPLv3+
URL: http://gergely.polonkai.eu/swe-glib/
Source: http://gergely.polonkai.eu/download/%{name}-%{version}.tar.gz
BuildRequires: pkgconfig
BuildRequires: glib2-devel
BuildRequires: gettext
BuildRequires: automake autoconf libtool
BuildRequires: gtk-doc
Requires: glib2
Requires: %{name}-data = %{version}-%{release}
%description
SWE-GLib is a GLib style wrapper library around the Swiss Ephemeris library,
created by Astrodienst. It can be used for precise astronomical calculation
based on time and topographic location.
%package data
Summary: A GLib style wrapper library around the Swiss Ephemeris library, created by Astrodienst.
Group: Development/Libraries
BuildArch: noarch
%description data
The swe-glib-data package includes data files for the SWE-GLib library.
%package devel
Summary: A GLib style wrapper library around the Swiss Ephemeris library, created by Astrodienst.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The swe-glib-devel package includes the header files for the SWE-GLib library.
%package doc
Summary: A GLib style wrapper library around the Swiss Ephemeris library, created by Astrodienst.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
The swe-glib-doc package includes documentation for the SWE-GLib library.
%prep
%setup -q
%build
%configure --enable-gtk-doc
make %{?_smp_mflags}
%install
make install DESTDIR=%{buildroot}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
rm -f $RPM_BUILD_ROOT%{_datadir}/locale/hu/LC_MESSAGES/swe-glib.mo
%post
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%doc ChangeLog
%{_libdir}/libswe-@SWE_VERSION@.so.*
%{_libdir}/libswe-glib-@SWE_GLIB_API_VERSION@.so.*
%{_libdir}/girepository-1.0/SweGlib-@SWE_GLIB_API_VERSION@.typelib
%files data
%{_datadir}/swe-glib/*.se1
%{_datadir}/swe-glib/seleapsec.txt
%files doc
%doc %{_datadir}/gtk-doc/html/*
%files devel
%{_includedir}/*
%{_libdir}/pkgconfig/*
%{_datadir}/gir-1.0/SweGlib-@SWE_GLIB_API_VERSION@.gir
%{_libdir}/libswe-@SWE_VERSION@.so
%{_libdir}/libswe-glib-@SWE_GLIB_API_VERSION@.so
%{_datadir}/vala/vapi/SweGlib-@SWE_GLIB_API_VERSION@.vapi
%changelog

@ -1,117 +0,0 @@
## Process this file with automake to produce Makefile.in
# We require automake 1.6 at least.
AUTOMAKE_OPTIONS = 1.6
# This is a blank Makefile.am for using gtk-doc.
# Copy this to your project's API docs directory and modify the variables to
# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
# of using the various options.
# The name of the module, e.g. 'glib'.
DOC_MODULE=swe-glib
# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
DOC_MODULE_VERSION=$(SWE_GLIB_API_VERSION)
# The top-level XML file (SGML in the past). You can change this if you want to.
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
# Directories containing the source code.
# gtk-doc will search all .c and .h files beneath these paths
# for inline comments documenting functions and macros.
# e.g. DOC_SOURCE_DIR=$(top_srcdir)/gtk $(top_srcdir)/gdk
DOC_SOURCE_DIR=$(top_srcdir)/src
# Extra options to pass to gtkdoc-scangobj. Not normally needed.
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan.
# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
SCAN_OPTIONS=--rebuild-types --deprecated-guards="GSWE_DISABLE_DEPRECATED"
# Extra options to supply to gtkdoc-mkdb.
# e.g. MKDB_OPTIONS=--xml-mode --output-format=xml
MKDB_OPTIONS=--xml-mode --output-format=xml
# Extra options to supply to gtkdoc-mktmpl
# e.g. MKTMPL_OPTIONS=--only-section-tmpl
MKTMPL_OPTIONS=
# Extra options to supply to gtkdoc-mkhtml
MKHTML_OPTIONS=
# Extra options to supply to gtkdoc-fixref. Not normally needed.
# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
FIXXREF_OPTIONS=
# Used for dependencies. The docs will be rebuilt if any of these change.
# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
HFILE_GLOB=$(top_srcdir)/src/*.h
CFILE_GLOB=$(top_srcdir)/src/*.c
# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
EXTRA_HFILES=
# Header files or dirs to ignore when scanning. Use base file/dir names
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES = \
swe-glib-private.h \
gswe-enumtypes.h \
gswe-moon-phase-data-private.h \
gswe-sign-info-private.h \
gswe-planet-info-private.h \
gswe-planet-data-private.h \
gswe-aspect-info-private.h \
gswe-aspect-data-private.h \
gswe-antiscion-axis-info-private.h \
gswe-antiscion-data-private.h \
gswe-house-system-info-private.h \
gswe-house-data-private.h \
$(NULL)
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
HTML_IMAGES=
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
content_files=
# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
# These files must be listed here *and* in content_files
# e.g. expand_content_files=running.sgml
expand_content_files=
# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
# Only needed if you are using gtkdoc-scangobj to dynamically query widget
# signals and properties.
# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
GTKDOC_CFLAGS=
GTKDOC_LIBS=$(LIBSWE_GLIB_LIBS) -lswe -ldl $(NULL)
# This includes the standard gtk-doc make rules, copied by gtkdocize.
include $(top_srcdir)/gtk-doc.make
# Other files to distribute
# e.g. EXTRA_DIST += version.xml.in
EXTRA_DIST += version.xml.in
# Files not to distribute
# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
DISTCLEANFILES = $(DOC_MODULE).types
# Comment this out if you want 'make check' to test you doc status
# and run some sanity checks
if ENABLE_GTK_DOC
TESTS_ENVIRONMENT = cd $(srcdir) && \
DOC_MODULE=$(DOC_MODULE) DOC_MAIN_SGML_FILE=$(DOC_MAIN_SGML_FILE) \
SRCDIR=$(abs_srcdir) BUILDDIR=$(abs_builddir)
#TESTS = $(GTKDOC_CHECK)
endif

@ -1,52 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY server "gergely.polonkai.eu">
]>
<book id="index">
<bookinfo>
<title>SWE-GLib Reference Manual</title>
<releaseinfo>
for SWE-GLib &version;.
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://&server;/swe-glib/index.html">http://&server;/swe-glib/</ulink>.
</releaseinfo>
</bookinfo>
<chapter>
<title>SWE-GLib</title>
<xi:include href="xml/gswe-types.xml"/>
<xi:include href="xml/gswe-sign-info.xml" />
<xi:include href="xml/gswe-planet-info.xml" />
<xi:include href="xml/gswe-planet-data.xml" />
<xi:include href="xml/gswe-moon-phase-data.xml"/>
<xi:include href="xml/gswe-aspect-data.xml" />
<xi:include href="xml/gswe-aspect-info.xml" />
<xi:include href="xml/gswe-antiscion-axis-info.xml" />
<xi:include href="xml/gswe-antiscion-data.xml" />
<xi:include href="xml/gswe-house-system-info.xml" />
<xi:include href="xml/gswe-house-data.xml" />
<xi:include href="xml/swe-glib.xml"/>
<xi:include href="xml/gswe-moment.xml"/>
<xi:include href="xml/gswe-timestamp.xml"/>
<xi:include href="xml/gswe-version.xml"/>
</chapter>
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>
</chapter>
<index id="api-index-full">
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
<index id="deprecated-api-index" role="deprecated">
<title>Index of deprecated API</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
</book>

@ -1,331 +0,0 @@
<SECTION>
<FILE>gswe-moment</FILE>
<TITLE>GsweMoment</TITLE>
GsweMoment
GsweMomentClass
gswe_moment_new
gswe_moment_new_full
gswe_moment_set_timestamp
gswe_moment_get_timestamp
gswe_moment_set_coordinates
gswe_moment_get_coordinates
gswe_moment_set_house_system
gswe_moment_get_house_system
gswe_moment_get_house_cusps
gswe_moment_get_house
gswe_moment_has_planet
gswe_moment_add_planet
gswe_moment_add_all_planets
gswe_moment_get_all_planets
gswe_moment_get_planet
gswe_moment_get_sign_planets
gswe_moment_get_house_planets
gswe_moment_get_element_points
gswe_moment_get_quality_points
gswe_moment_get_moon_phase
gswe_moment_get_all_aspects
gswe_moment_get_planet_aspects
gswe_moment_get_aspect_by_planets
gswe_moment_get_all_antiscia
gswe_moment_get_all_planet_antiscia
gswe_moment_get_axis_all_antiscia
gswe_moment_get_axis_planet_antiscia
gswe_moment_get_antiscion_by_planets
<SUBSECTION Standard>
GSWE_IS_MOMENT
GSWE_IS_MOMENT_CLASS
GSWE_MOMENT
GSWE_MOMENT_CLASS
GSWE_MOMENT_GET_CLASS
GSWE_TYPE_MOMENT
GsweMomentPrivate
gswe_moment_get_type
</SECTION>
<SECTION>
<FILE>gswe-moon-phase-data</FILE>
gswe_moon_phase_data_new
gswe_moon_phase_data_ref
gswe_moon_phase_data_unref
gswe_moon_phase_data_calculate_by_timestamp
gswe_moon_phase_data_calculate_by_jd
gswe_moon_phase_data_get_phase
gswe_moon_phase_data_get_illumination
GsweMoonPhaseData
<SUBSECTION Standard>
GSWE_TYPE_MOON_PHASE_DATA
gswe_moon_phase_data_get_type
</SECTION>
<SECTION>
<FILE>gswe-sign-info</FILE>
GsweSignInfo
gswe_find_sign_info_by_id
gswe_sign_info_new
gswe_sign_info_ref
gswe_sign_info_unref
gswe_sign_info_set_sign
gswe_sign_info_get_sign
gswe_sign_info_set_name
gswe_sign_info_get_name
gswe_sign_info_set_element
gswe_sign_info_get_element
gswe_sign_info_set_quality
gswe_sign_info_get_quality
<SUBSECTION Standard>
GSWE_TYPE_SIGN_INFO
gswe_sign_info_get_type
</SECTION>
<SECTION>
<FILE>gswe-planet-info</FILE>
GswePlanetInfo
gswe_find_planet_info_by_id
gswe_all_planets
gswe_planet_info_new
gswe_planet_info_ref
gswe_planet_info_unref
gswe_planet_info_set_name
gswe_planet_info_get_name
gswe_planet_info_set_orb
gswe_planet_info_get_orb
gswe_planet_info_set_planet
gswe_planet_info_get_planet
gswe_planet_info_set_points
gswe_planet_info_get_points
gswe_planet_info_set_real_body
gswe_planet_info_get_real_body
gswe_planet_info_set_sweph_id
gswe_planet_info_get_sweph_id
<SUBSECTION Standard>
GSWE_TYPE_PLANET_INFO
gswe_planet_info_get_type
</SECTION>
<SECTION>
<FILE>gswe-planet-data</FILE>
GswePlanetData
gswe_planet_data_new
gswe_planet_data_ref
gswe_planet_data_unref
gswe_planet_data_set_planet
gswe_planet_data_get_planet
gswe_planet_data_set_planet_info
gswe_planet_data_get_planet_info
gswe_planet_data_get_position
gswe_planet_data_get_retrograde
gswe_planet_data_get_house
gswe_planet_data_get_sign
gswe_planet_data_get_sign_info
<SUBSECTION Standard>
GSWE_TYPE_PLANET_DATA
gswe_planet_data_get_type
</SECTION>
<SECTION>
<FILE>gswe-aspect-info</FILE>
GsweAspectInfo
gswe_find_aspect_info_by_id
gswe_all_aspects
gswe_aspect_info_new
gswe_aspect_info_ref
gswe_aspect_info_unref
gswe_aspect_info_set_aspect
gswe_aspect_info_get_aspect
gswe_aspect_info_set_name
gswe_aspect_info_get_name
gswe_aspect_info_set_size
gswe_aspect_info_get_size
gswe_aspect_info_set_orb_modifier
gswe_aspect_info_get_orb_modifier
gswe_aspect_info_set_harmonic
gswe_aspect_info_get_harmonic
gswe_aspect_info_set_major
gswe_aspect_info_get_major
<SUBSECTION Standard>
GSWE_TYPE_ASPECT_INFO
gswe_aspect_info_get_type
</SECTION>
<SECTION>
<FILE>gswe-aspect-data</FILE>
GsweAspectData
gswe_aspect_data_new
gswe_aspect_data_new_with_planets
gswe_aspect_data_ref
gswe_aspect_data_unref
gswe_aspect_data_set_planet1
gswe_aspect_data_get_planet1
gswe_aspect_data_set_planet2
gswe_aspect_data_get_planet2
gswe_aspect_data_get_distance
gswe_aspect_data_get_aspect
gswe_aspect_data_get_aspect_info
gswe_aspect_data_get_difference
<SUBSECTION Standard>
GSWE_TYPE_ASPECT_DATA
gswe_aspect_data_get_type
</SECTION>
<SECTION>
<FILE>gswe-antiscion-axis-info</FILE>
GsweAntiscionAxisInfo
gswe_find_antiscion_axis_info_by_id
gswe_all_antiscion_axes
gswe_antiscion_axis_info_new
gswe_antiscion_axis_info_ref
gswe_antiscion_axis_info_unref
gswe_antiscion_axis_info_set_axis
gswe_antiscion_axis_info_get_axis
gswe_antiscion_axis_info_set_name
gswe_antiscion_axis_info_get_name
gswe_antiscion_axis_info_set_sign_offset
gswe_antiscion_axis_info_get_sign_offset
gswe_antiscion_axis_info_set_start_sign_info
gswe_antiscion_axis_info_get_start_sign_info
gswe_antiscion_axis_info_set_start_sign
gswe_antiscion_axis_info_get_start_sign
<SUBSECTION Standard>
GSWE_TYPE_ANTISCION_AXIS_INFO
gswe_antiscion_axis_info_get_type
</SECTION>
<SECTION>
<FILE>gswe-antiscion-data</FILE>
GsweAntiscionData
gswe_antiscion_data_new
gswe_antiscion_data_new_with_planets
gswe_antiscion_data_ref
gswe_antiscion_data_unref
gswe_antiscion_data_set_planet1
gswe_antiscion_data_get_planet1
gswe_antiscion_data_set_planet2
gswe_antiscion_data_get_planet2
gswe_antiscion_data_calculate
gswe_antiscion_data_get_axis
gswe_antiscion_data_get_antiscion_axis_info
gswe_antiscion_data_get_difference
<SUBSECTION Standard>
GSWE_TYPE_ANTISCION_DATA
gswe_antiscion_data_get_type
</SECTION>
<SECTION>
<FILE>gswe-house-system-info</FILE>
GsweHouseSystemInfo
gswe_find_house_system_info_by_id
gswe_all_house_systems
gswe_house_system_info_new
gswe_house_system_info_ref
gswe_house_system_info_unref
gswe_house_system_info_set_house_system
gswe_house_system_info_get_house_system
gswe_house_system_info_set_sweph_id
gswe_house_system_info_get_sweph_id
gswe_house_system_info_set_name
gswe_house_system_info_get_name
<SUBSECTION Standard>
GSWE_TYPE_HOUSE_SYSTEM_INFO
gswe_house_system_info_get_type
</SECTION>
<SECTION>
<FILE>gswe-house-data</FILE>
GsweHouseData
gswe_house_data_new
gswe_house_data_ref
gswe_house_data_unref
gswe_house_data_get_house
gswe_house_data_get_cusp_position
gswe_house_data_get_sign
gswe_house_data_get_sign_info
<SUBSECTION Standard>
GSWE_TYPE_HOUSE_DATA
gswe_house_data_get_type
</SECTION>
<SECTION>
<FILE>gswe-timestamp</FILE>
<TITLE>GsweTimestamp</TITLE>
GsweTimestamp
GsweTimestampClass
GsweTimestampValidityFlags
gswe_timestamp_new
gswe_timestamp_new_from_julian_day
gswe_timestamp_new_from_gregorian_full
gswe_timestamp_new_from_now_local
gswe_timestamp_set_gregorian_full
gswe_timestamp_set_instant_recalc
gswe_timestamp_get_instant_recalc
gswe_timestamp_set_gregorian_year
gswe_timestamp_get_gregorian_year
gswe_timestamp_set_gregorian_month
gswe_timestamp_get_gregorian_month
gswe_timestamp_set_gregorian_day
gswe_timestamp_get_gregorian_day
gswe_timestamp_set_gregorian_hour
gswe_timestamp_get_gregorian_hour
gswe_timestamp_set_gregorian_minute
gswe_timestamp_get_gregorian_minute
gswe_timestamp_set_gregorian_second
gswe_timestamp_get_gregorian_second
gswe_timestamp_set_gregorian_microsecond
gswe_timestamp_get_gregorian_microsecond
gswe_timestamp_set_gregorian_timezone
gswe_timestamp_get_gregorian_timezone
gswe_timestamp_set_now_local
gswe_timestamp_set_julian_day
gswe_timestamp_get_julian_day
gswe_timestamp_set_julian_day_et
gswe_timestamp_get_julian_day_et
gswe_timestamp_set_julian_day_ut
gswe_timestamp_get_julian_day_ut
gswe_timestamp_get_sidereal_time
<SUBSECTION Standard>
GSWE_IS_TIMESTAMP
GSWE_IS_TIMESTAMP_CLASS
GSWE_TIMESTAMP
GSWE_TIMESTAMP_CLASS
GSWE_TIMESTAMP_GET_CLASS
GSWE_TYPE_TIMESTAMP
GsweTimestampPrivate
gswe_timestamp_get_type
</SECTION>
<SECTION>
<FILE>gswe-types</FILE>
GswePlanet
GSWE_PLANET_LILITH
GSWE_PLANET_OFFSET_VIRTUAL_NODES
GSWE_PLANET_OFFSET_PLANETS
GSWE_PLANET_OFFSET_ASTEROIDS
GSWE_PLANET_OFFSET_CUSTOM
GsweZodiac
GsweAspect
GsweAntiscionAxis
GsweElement
GsweQuality
GsweHouseSystem
GsweMoonPhase
GsweCoordinates
<SUBSECTION Standard>
GSWE_TYPE_COORDINATES
gswe_coordinates_get_type
</SECTION>
<SECTION>
<FILE>swe-glib</FILE>
GsweError
gswe_error_quark
GSWE_ERROR
gswe_init
</SECTION>
<SECTION>
<FILE>gswe-version</FILE>
GSWE_MAJOR_VERSION
GSWE_MINOR_VERSION
GSWE_MICRO_VERSION
GSWE_CHECK_VERSION
gswe_check_version
</SECTION>

@ -1 +0,0 @@
@SWE_GLIB_API_VERSION@

@ -1,52 +0,0 @@
const GLib = imports.gi.GLib;
const Swe = imports.gi.SweGlib;
const Format = imports.format;
String.prototype.format = Format.format;
Swe.init();
var timestamp = new Swe.Timestamp();
timestamp.set_gregorian_full(1983, 3, 7, 11, 54, 45, 0, 1);
var moment = new Swe.Moment();
moment.add_all_planets();
moment.set_timestamp(timestamp);
moment.set_coordinates(19.03991, 47.49801, 280);
moment.set_house_system(Swe.HouseSystem.PLACIDUS);
var all_planets = moment.get_all_planets()
for (var i = 0; i < all_planets.length; i++) {
var planet = all_planets[i];
var position = planet.get_position();
var sign_position = position % 30;
var degree = Math.floor(sign_position);
var minute = Math.floor((sign_position - degree) * 60);
var second = Math.floor(((sign_position - degree) * 60 - minute) * 60)
print("%s: %.6f (%d°%d′%d″ %s)".format(planet.get_planet_info().get_name(), position, degree, minute, second, planet.get_sign_info().get_name()));
}
var all_aspects = moment.get_all_aspects();
for (var i = 0; i < all_aspects.length; i++) {
var aspect = all_aspects[i];
if (aspect.get_aspect() != Swe.Aspect.NONE) {
var planet1 = aspect.get_planet1();
var planet2 = aspect.get_planet2();
print("%s in %s with %s (±%.2f%%)".format(planet1.get_planet_info().get_name(), aspect.get_aspect_info().get_name(), planet2.get_planet_info().get_name(), aspect.get_difference()));
}
}
var all_antiscia = moment.get_all_antiscia();
for (var i = 0; i < all_antiscia.length; i++) {
var antiscion = all_antiscia[i];
if (antiscion.get_axis() != Swe.AntiscionAxis.NONE) {
var planet1 = antiscion.get_planet1();
var planet2 = antiscion.get_planet2();
print("%s is antiscion of %s on axis %s (±%.2f%%)".format(planet1.get_planet_info().get_name(), planet2.get_planet_info().get_name(), antiscion.get_antiscion_axis_info().get_name(), antiscion.get_difference().toFixed(2)));
}
}

@ -1,44 +0,0 @@
local lgi = require 'lgi'
local SweGlib = lgi.require('SweGlib', '2.0')
SweGlib.init()
local timestamp = SweGlib.Timestamp.new()
timestamp:set_gregorian_full(1983, 3, 7, 11, 54, 45, 0, 1)
local moment = SweGlib.Moment.new()
moment:set_timestamp(timestamp)
moment:set_timestamp(timestamp)
moment:set_coordinates(19.03990999, 47.49801000, 280)
moment:set_house_system(SweGlib.HouseSystem.PLACIDUS)
moment:add_all_planets()
local all_planets = moment:get_all_planets()
for _, planet in ipairs(all_planets) do
local position = planet:get_position()
local sign_position = math.fmod(position, 30)
local degree = math.floor(sign_position)
local minute = math.floor((sign_position - degree) * 60)
local second = math.floor(((sign_position - degree) * 60 - minute) * 60)
io.write(string.format("%s: %f (%d°%d′%d″ %s)\n", planet:get_planet_info():get_name(), position, degree, minute, second, planet:get_sign_info():get_name()))
end
local all_aspects = moment:get_all_aspects()
for _, aspect in ipairs(all_aspects) do
if aspect:get_aspect() ~= "NONE" then
local planet1 = aspect:get_planet1()
local planet2 = aspect:get_planet2()
io.write(string.format("%s in %s with %s (±%.2f%%)\n", planet1:get_planet_info():get_name(), aspect:get_aspect_info():get_name(), planet2:get_planet_info():get_name(), aspect:get_difference()))
end
end
local all_antiscia = moment:get_all_antiscia()
for _, antiscion in ipairs(all_antiscia) do
if antiscion:get_axis() ~= "NONE" then
local planet1 = antiscion:get_planet1()
local planet2 = antiscion:get_planet2()
io.write(string.format("%s is antiscion of %s on axis %s (±%.2f%%)\n", planet1:get_planet_info():get_name(), planet2:get_planet_info():get_name(), antiscion:get_antiscion_axis_info():get_name(), antiscion:get_difference()))
end
end

@ -1,55 +0,0 @@
#!/bin/env perl
package SweGlib;
use utf8;
use strict;
use POSIX;
use Glib::Object::Introspection;
binmode STDOUT, ':encoding(UTF-8)';
Glib::Object::Introspection->setup(basename => 'SweGlib', version => '2.0', package => 'SweGlib');
package main;
SweGlib::init();
my $timestamp = SweGlib::Timestamp->new();
$timestamp->set_gregorian_full(1983, 3, 7, 11, 54, 45, 0, 1);
my $moment = SweGlib::Moment->new();
$moment->set_timestamp($timestamp);
$moment->set_coordinates(19.03991, 47.49801, 280);
$moment->set_house_system("placidus");
$moment->add_all_planets();
my $all_planets = $moment->get_all_planets();
foreach my $planet (@{$all_planets}) {
my $position = $planet->get_position();
my $sign_position = POSIX::fmod($position, 30);
my $degree = POSIX::floor($sign_position);
my $minute = POSIX::floor(($sign_position - $degree) * 60);
my $second = POSIX::floor((($sign_position - $degree) * 60 - $minute) * 60);
printf("%s: %f (%d°%d′%d″ %s)\n", $planet->get_planet_info()->get_name(), $position, $degree, $minute, $second, $planet->get_sign_info()->get_name());
}
my $all_aspects = $moment->get_all_aspects();
foreach my $aspect (@{$all_aspects}) {
if ($aspect->get_aspect() ne "none") {
my $planet1 = $aspect->get_planet1();
my $planet2 = $aspect->get_planet2();
printf("%s in %s with %s (±%.2f%%)\n", $planet1->get_planet_info()->get_name(), $aspect->get_aspect_info->get_name(), $planet2->get_planet_info()->get_name(), $aspect->get_difference());
}
}
my $all_antiscia = $moment->get_all_antiscia();
foreach my $antiscion (@{$all_antiscia}) {
if ($antiscion->get_axis() ne "none") {
my $planet1 = $antiscion->get_planet1();
my $planet2 = $antiscion->get_planet2();
printf("%s is antiscion of %s on axis %s (±%.2f%%)\n", $planet1->get_planet_info()->get_name(), $planet2->get_planet_info()->get_name(), $antiscion->get_antiscion_axis_info()->get_name(), $antiscion->get_difference());
}
}

@ -1,44 +0,0 @@
# -*- coding: utf-8 -*-
from gi.repository import SweGlib
import math
import codecs
import sys
sys.stdout = codecs.getwriter('utf-8')(sys.stdout)
SweGlib.init()
timestamp = SweGlib.Timestamp()
timestamp.set_gregorian_full(1983, 3, 7, 11, 54, 45, 0, 1)
moment = SweGlib.Moment()
moment.set_timestamp(timestamp)
moment.set_coordinates(19.03991, 47.49801, 280)
moment.set_house_system(SweGlib.HouseSystem.PLACIDUS)
moment.add_all_planets()
all_planets = moment.get_all_planets()
for planet in all_planets:
position = planet.get_position()
sign_position = position % 30
degree = math.floor(sign_position)
minute = math.floor((sign_position - degree) * 60)
second = math.floor(((sign_position - degree) * 60 - minute) * 60)
print u"%s: %f (%d°%d%d%s)" % (planet.get_planet_info().get_name(), position, degree, minute, second, planet.get_sign_info().get_name())
all_aspects = moment.get_all_aspects()
for aspect in all_aspects:
if aspect.get_aspect() != SweGlib.Aspect.NONE:
planet1 = aspect.get_planet1()
planet2 = aspect.get_planet2()
print u"%s in %s with %s%.2f%%)" % (planet1.get_planet_info().get_name(), aspect.get_aspect_info().get_name(), planet2.get_planet_info().get_name(), aspect.get_difference())
all_antiscia = moment.get_all_antiscia()
for antiscion in all_antiscia:
if antiscion.get_axis() != SweGlib.AntiscionAxis.NONE:
planet1 = antiscion.get_planet1()
planet2 = antiscion.get_planet2()
print u"%s is antiscion of %s on axis %s%.2f%%)" % (planet1.get_planet_info().get_name(), planet2.get_planet_info().get_name(), antiscion.get_antiscion_axis_info().get_name(), antiscion.get_difference())

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.